public static class AbstractLongBigList.LongSubList extends AbstractLongBigList implements Serializable
AbstractLongBigList.LongSubList| Constructor and Description |
|---|
LongSubList(LongBigList l,
long from,
long to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long k) |
void |
add(long index,
long k) |
boolean |
addAll(long index,
Collection<? extends Long> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
boolean |
addAll(long index,
LongCollection c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
LongList l) |
void |
addElements(long index,
long[][] a,
long offset,
long length)
Adds elements to this type-specific big list one-by-one.
|
void |
clear() |
void |
getElements(long from,
long[][] a,
long offset,
long length)
Copies element of this type-specific big list into the given big array one-by-one.
|
long |
getLong(long index) |
LongBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(long k)
|
boolean |
remove(Object o)
Delegates to the type-specific
rem() method. |
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
long |
removeLong(long index) |
long |
set(long index,
long k) |
long |
size64()
Returns the size of this data structure as a long.
|
LongBigList |
subList(long from,
long to)
Returns a type-specific view of the portion of this type-specific big list from the index
from, inclusive, to the index to, exclusive. |
add, addAll, addAll, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, getLong, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekLong, pop, popLong, push, push, remove, remove, removeLong, set, set, size, size, size, top, topLong, toStringadd, contains, containsAll, containsAll, isEmpty, longIterator, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, toLongArraycontainsAll, longIterator, removeAll, retainAll, toArray, toArray, toLongArray, toLongArrayadd, contains, containsAll, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArraypublic LongSubList(LongBigList l, long from, long to)
public boolean add(long k)
add in interface LongCollectionadd in class AbstractLongBigListCollection.add(Object)public void add(long index,
long k)
add in interface LongBigListadd in class AbstractLongBigListList.add(int,Object)public boolean addAll(long index,
Collection<? extends Long> c)
BigListaddAll in interface BigList<Long>addAll in class AbstractLongBigListindex - index at which to insert the first element from the specified collection.c - collection containing elements to be added to this big list.true if this big list changed as a result of the callList.addAll(int, Collection)public long getLong(long index)
getLong in interface LongBigListBigList.get(long)public long removeLong(long index)
removeLong in interface LongBigListremoveLong in class AbstractLongBigListBigList.remove(long)public long set(long index,
long k)
set in interface LongBigListset in class AbstractLongBigListBigList.set(long,Object)public void clear()
clear in interface Collection<Long>clear in class AbstractCollection<Long>public long size64()
Size64public void getElements(long from,
long[][] a,
long offset,
long length)
AbstractLongBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface LongBigListgetElements in class AbstractLongBigListfrom - the start index (inclusive).a - the destination big array.offset - the offset into the destination big array where to store the first element copied.length - the number of elements to be copied.public void removeElements(long from,
long to)
AbstractLongBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface LongBigListremoveElements in class AbstractLongBigListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(long index,
long[][] a,
long offset,
long length)
AbstractLongBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface LongBigListaddElements in class AbstractLongBigListindex - the index at which to add elements.a - the big array containing the elements.offset - the offset of the first element to add.length - the number of elements to add.public LongBigListIterator listIterator(long index)
LongBigListlistIterator in interface BigList<Long>listIterator in interface LongBigListlistIterator in class AbstractLongBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public LongBigList subList(long from, long to)
LongBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long).
subList in interface BigList<Long>subList in interface LongBigListsubList in class AbstractLongBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean rem(long k)
LongCollectionremove(), but the clash with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().rem in interface LongCollectionrem in class AbstractLongBigListCollection.remove(Object)public boolean remove(Object o)
AbstractLongCollectionrem() method.remove in interface Collection<Long>remove in class AbstractLongCollectionpublic boolean addAll(long index,
LongCollection c)
AbstractLongBigListaddAll in interface LongBigListaddAll in class AbstractLongBigListList.addAll(int,java.util.Collection)public boolean addAll(long index,
LongList l)