public static class AbstractLongBigList.LongSubList extends AbstractLongBigList implements java.io.Serializable
AbstractLongBigList.LongRandomAccessSubList, AbstractLongBigList.LongSubList| Modifier and Type | Field and Description |
|---|---|
protected long |
from
Initial (inclusive) index of this sublist.
|
protected LongBigList |
l
The list this sublist restricts.
|
protected long |
to
Final (exclusive) index of this sublist.
|
| 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)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Long> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
boolean |
addAll(long index,
LongBigList l)
Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
it.unimi.dsi.fastutil.longs.LongCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
void |
addElements(long index,
long[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
void |
getElements(long from,
long[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
long |
getLong(long index)
Returns the element at the specified position.
|
it.unimi.dsi.fastutil.longs.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)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
long |
removeLong(long index)
Removes the element at the specified position.
|
long |
set(long index,
long k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
long |
size64() |
it.unimi.dsi.fastutil.longs.LongSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
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, addElements, clear, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, forEach, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekLong, pop, popLong, push, push, remove, set, setElements, size, size, top, topLong, toStringadd, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, addAll, getElements, setElements, setElementsadd, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayprotected final LongBigList l
protected final long from
protected long to
public LongSubList(LongBigList l, long from, long to)
public boolean add(long k)
AbstractLongBigListadd in interface it.unimi.dsi.fastutil.longs.LongCollectionadd in class AbstractLongBigListpublic void add(long index,
long k)
AbstractLongBigListadd in interface LongBigListadd in class AbstractLongBigListBigList.add(long,Object)public boolean addAll(long index,
java.util.Collection<? extends java.lang.Long> c)
AbstractLongBigListaddAll in interface it.unimi.dsi.fastutil.BigList<java.lang.Long>addAll in class AbstractLongBigListpublic long getLong(long index)
LongBigListgetLong in interface LongBigListBigList.get(long)public long removeLong(long index)
AbstractLongBigListremoveLong in interface LongBigListremoveLong in class AbstractLongBigListBigList.remove(long)public long set(long index,
long k)
AbstractLongBigListset in interface LongBigListset in class AbstractLongBigListBigList.set(long,Object)public long size64()
size64 in interface it.unimi.dsi.fastutil.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 it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator(long index)
AbstractLongBigListlistIterator in interface it.unimi.dsi.fastutil.BigList<java.lang.Long>listIterator in interface LongBigListlistIterator in class AbstractLongBigListBigList.listIterator(long)public it.unimi.dsi.fastutil.longs.LongSpliterator spliterator()
LongBigListBigList spliterators must report at least Spliterator.SIZED and Spliterator.ORDERED.
See List.spliterator() for more documentation on the requirements
of the returned spliterator (despite BigList not being a List, most of the
same requirements apply.
spliterator in interface LongBigListspliterator in interface it.unimi.dsi.fastutil.longs.LongCollectionspliterator in interface it.unimi.dsi.fastutil.longs.LongIterablespliterator in interface java.lang.Iterable<java.lang.Long>spliterator in interface java.util.Collection<java.lang.Long>public LongBigList subList(long from, long to)
LongBigListfrom, inclusive, to the index to, exclusive.subList in interface it.unimi.dsi.fastutil.BigList<java.lang.Long>subList in interface LongBigListsubList in class AbstractLongBigListBigList.subList(long,long)public boolean rem(long k)
AbstractLongBigListrem in interface it.unimi.dsi.fastutil.longs.LongCollectionrem in class AbstractLongBigListCollection.remove(Object)public boolean addAll(long index,
it.unimi.dsi.fastutil.longs.LongCollection c)
AbstractLongBigListaddAll in interface LongBigListaddAll in class AbstractLongBigListList.addAll(int,java.util.Collection)public boolean addAll(long index,
LongBigList l)
LongBigListaddAll in interface LongBigListBigList.addAll(long,Collection)