public static class AbstractShortBigList.ShortSubList extends AbstractShortBigList implements java.io.Serializable
AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList| Modifier and Type | Field and Description |
|---|---|
protected long |
from
Initial (inclusive) index of this sublist.
|
protected ShortBigList |
l
The list this sublist restricts.
|
protected long |
to
Final (exclusive) index of this sublist.
|
| Constructor and Description |
|---|
ShortSubList(ShortBigList l,
long from,
long to) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long index,
short k)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
add(short k) |
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Short> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
boolean |
addAll(long index,
ShortBigList 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.shorts.ShortCollection 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,
short[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
void |
getElements(long from,
short[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
short |
getShort(long index)
Returns the element at the specified position.
|
it.unimi.dsi.fastutil.ints.IntSpliterator |
intSpliterator() |
it.unimi.dsi.fastutil.shorts.ShortBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(short 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.
|
short |
removeShort(long index)
Removes the element at the specified position.
|
short |
set(long index,
short k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
long |
size64() |
it.unimi.dsi.fastutil.shorts.ShortSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
ShortBigList |
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, peekShort, pop, popShort, push, push, remove, set, setElements, size, size, top, topShort, toStringadd, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toShortArray, toShortArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, addAll, getElements, setElements, setElementsadd, contains, containsAll, intIterator, intParallelStream, intStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayprotected final ShortBigList l
protected final long from
protected long to
public ShortSubList(ShortBigList l, long from, long to)
public boolean add(short k)
AbstractShortBigListadd in interface it.unimi.dsi.fastutil.shorts.ShortCollectionadd in class AbstractShortBigListpublic void add(long index,
short k)
AbstractShortBigListadd in interface ShortBigListadd in class AbstractShortBigListBigList.add(long,Object)public boolean addAll(long index,
java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigListaddAll in interface it.unimi.dsi.fastutil.BigList<java.lang.Short>addAll in class AbstractShortBigListpublic short getShort(long index)
ShortBigListgetShort in interface ShortBigListBigList.get(long)public short removeShort(long index)
AbstractShortBigListremoveShort in interface ShortBigListremoveShort in class AbstractShortBigListBigList.remove(long)public short set(long index,
short k)
AbstractShortBigListset in interface ShortBigListset in class AbstractShortBigListBigList.set(long,Object)public long size64()
size64 in interface it.unimi.dsi.fastutil.Size64public void getElements(long from,
short[][] a,
long offset,
long length)
AbstractShortBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface ShortBigListgetElements in class AbstractShortBigListfrom - 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)
AbstractShortBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface ShortBigListremoveElements in class AbstractShortBigListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(long index,
short[][] a,
long offset,
long length)
AbstractShortBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface ShortBigListaddElements in class AbstractShortBigListindex - 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.shorts.ShortBigListIterator listIterator(long index)
AbstractShortBigListlistIterator in interface it.unimi.dsi.fastutil.BigList<java.lang.Short>listIterator in interface ShortBigListlistIterator in class AbstractShortBigListBigList.listIterator(long)public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()
ShortBigListBigList 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 ShortBigListspliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectionspliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterablespliterator in interface java.lang.Iterable<java.lang.Short>spliterator in interface java.util.Collection<java.lang.Short>public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
intSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectionintSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterableintSpliterator in class AbstractShortBigListpublic ShortBigList subList(long from, long to)
ShortBigListfrom, inclusive, to the index to, exclusive.subList in interface it.unimi.dsi.fastutil.BigList<java.lang.Short>subList in interface ShortBigListsubList in class AbstractShortBigListBigList.subList(long,long)public boolean rem(short k)
AbstractShortBigListrem in interface it.unimi.dsi.fastutil.shorts.ShortCollectionrem in class AbstractShortBigListCollection.remove(Object)public boolean addAll(long index,
it.unimi.dsi.fastutil.shorts.ShortCollection c)
AbstractShortBigListaddAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean addAll(long index,
ShortBigList l)
ShortBigListaddAll in interface ShortBigListBigList.addAll(long,Collection)