public static class AbstractShortBigList.ShortSubList extends AbstractShortBigList implements java.io.Serializable
AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList
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)
Ensures that this collection contains the specified element (optional operation).
|
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,
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.
|
IntSpliterator |
intSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
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()
Returns the size of this data structure as a long.
|
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, equals, forEach, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekShort, pop, popShort, push, push, remove, set, setElements, size, size, top, topShort, toString
add, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toShortArray, toShortArray
addAll, addAll, addAll, setElements, setElements
add, contains, containsAll, intIterator, intParallelStream, intStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArray
containsAll, isEmpty, removeAll, retainAll, toArray, toArray
forEach, forEach
public ShortSubList(ShortBigList l, long from, long to)
public boolean add(short k)
AbstractShortBigList
add
in interface ShortCollection
add
in class AbstractShortBigList
Collection.add(Object)
public void add(long index, short k)
AbstractShortBigList
add
in interface ShortBigList
add
in class AbstractShortBigList
BigList.add(long,Object)
public boolean addAll(long index, java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigList
addAll
in interface BigList<java.lang.Short>
addAll
in class AbstractShortBigList
index
- 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 short getShort(long index)
ShortBigList
getShort
in interface ShortBigList
BigList.get(long)
public short removeShort(long index)
AbstractShortBigList
removeShort
in interface ShortBigList
removeShort
in class AbstractShortBigList
BigList.remove(long)
public short set(long index, short k)
AbstractShortBigList
set
in interface ShortBigList
set
in class AbstractShortBigList
BigList.set(long,Object)
public long size64()
Size64
public void getElements(long from, short[][] a, long offset, long length)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface ShortBigList
getElements
in class AbstractShortBigList
from
- 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)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface ShortBigList
removeElements
in class AbstractShortBigList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(long index, short[][] a, long offset, long length)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface ShortBigList
addElements
in class AbstractShortBigList
index
- 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 ShortBigListIterator listIterator(long index)
AbstractShortBigList
listIterator
in interface BigList<java.lang.Short>
listIterator
in interface ShortBigList
listIterator
in class AbstractShortBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public ShortSpliterator spliterator()
ShortBigList
BigList 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 ShortBigList
spliterator
in interface ShortCollection
spliterator
in interface ShortIterable
spliterator
in interface java.lang.Iterable<java.lang.Short>
spliterator
in interface java.util.Collection<java.lang.Short>
public IntSpliterator intSpliterator()
ShortCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int
, long
, and double
.
intSpliterator
in interface ShortCollection
intSpliterator
in interface ShortIterable
intSpliterator
in class AbstractShortBigList
public ShortBigList subList(long from, long to)
ShortBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Short>
subList
in interface ShortBigList
subList
in class AbstractShortBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean rem(short k)
AbstractShortBigList
rem
in interface ShortCollection
rem
in class AbstractShortBigList
Collection.remove(Object)
public boolean addAll(long index, ShortCollection c)
AbstractShortBigList
addAll
in interface ShortBigList
addAll
in class AbstractShortBigList
List.addAll(int,java.util.Collection)
public boolean addAll(long index, ShortBigList l)
ShortBigList
addAll
in interface ShortBigList
BigList.addAll(long,Collection)