public static class ShortBigLists.Singleton extends AbstractShortBigList implements java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific big list.
AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.Short> c) |
boolean |
addAll(long i,
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 i,
ShortBigList c)
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 i,
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).
|
boolean |
addAll(ShortBigList c)
Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
|
boolean |
addAll(ShortCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(short k)
Returns true if this list contains the specified element.
|
short |
getShort(long i)
Returns the element at the specified position.
|
long |
indexOf(short k)
Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
|
ShortBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
ShortBigListIterator |
listIterator(long i)
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).
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(ShortCollection c)
Remove from this collection all elements in the given type-specific collection.
|
short |
removeShort(long i)
Removes the element at the specified position.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(ShortCollection c)
Retains in this collection only elements from the given type-specific collection.
|
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. |
short[] |
toShortArray()
Returns a primitive type array containing the items of this collection.
|
add, add, add, addElements, addElements, compareTo, equals, forEach, get, getElements, hashCode, indexOf, intSpliterator, iterator, lastIndexOf, lastIndexOf, peek, peekShort, pop, popShort, push, push, remove, removeElements, set, set, setElements, size, size, top, topShort, toString
add, contains, containsAll, containsAll, remove, toArray, toShortArray
addAll, addAll, setElements, setElements
add, contains, containsAll, intIterator, intParallelStream, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray, toShortArray
forEach, forEach
public short getShort(long i)
ShortBigList
getShort
in interface ShortBigList
BigList.get(long)
public boolean rem(short k)
AbstractShortBigList
rem
in interface ShortCollection
rem
in class AbstractShortBigList
Collection.remove(Object)
public short removeShort(long i)
AbstractShortBigList
removeShort
in interface ShortBigList
removeShort
in class AbstractShortBigList
BigList.remove(long)
public boolean contains(short k)
AbstractShortBigList
contains
in interface ShortCollection
contains
in class AbstractShortBigList
Collection.contains(Object)
public long indexOf(short k)
ShortBigList
indexOf
in interface ShortBigList
indexOf
in class AbstractShortBigList
BigList.indexOf(Object)
public short[] toShortArray()
ShortCollection
toShortArray
in interface ShortCollection
toShortArray
in class AbstractShortCollection
Collection.toArray()
public ShortBigListIterator listIterator()
AbstractShortBigList
listIterator
in interface BigList<java.lang.Short>
listIterator
in interface ShortBigList
listIterator
in class AbstractShortBigList
BigList.listIterator()
public ShortBigListIterator listIterator(long i)
AbstractShortBigList
listIterator
in interface BigList<java.lang.Short>
listIterator
in interface ShortBigList
listIterator
in class AbstractShortBigList
i
- 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 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 addAll(long i, java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigList
addAll
in interface BigList<java.lang.Short>
addAll
in class AbstractShortBigList
i
- 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 boolean addAll(java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigList
addAll
in interface java.util.Collection<java.lang.Short>
addAll
in class AbstractShortBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractShortCollection
removeAll
in interface java.util.Collection<java.lang.Short>
removeAll
in class AbstractShortCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractShortCollection
retainAll
in interface java.util.Collection<java.lang.Short>
retainAll
in class AbstractShortCollection
public boolean addAll(ShortBigList c)
ShortBigList
addAll
in interface ShortBigList
Collection.addAll(Collection)
public boolean addAll(long i, ShortBigList c)
ShortBigList
addAll
in interface ShortBigList
BigList.addAll(long,Collection)
public boolean addAll(long i, ShortCollection c)
AbstractShortBigList
addAll
in interface ShortBigList
addAll
in class AbstractShortBigList
List.addAll(int,java.util.Collection)
public boolean addAll(ShortCollection c)
AbstractShortBigList
addAll
in interface ShortCollection
addAll
in class AbstractShortBigList
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean removeAll(ShortCollection c)
ShortCollection
removeAll
in interface ShortCollection
removeAll
in class AbstractShortCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(ShortCollection c)
ShortCollection
retainAll
in interface ShortCollection
retainAll
in class AbstractShortCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public void clear()
AbstractShortBigList
clear
in interface java.util.Collection<java.lang.Short>
clear
in class AbstractShortBigList
public long size64()
Size64
public java.lang.Object clone()
clone
in class java.lang.Object