BigList<java.lang.Short>, ShortBigList, ShortCollection, ShortIterable, ShortStack, Size64, Stack<java.lang.Short>, java.io.Serializable, java.lang.Comparable<BigList<? extends java.lang.Short>>, java.lang.Iterable<java.lang.Short>, java.util.Collection<java.lang.Short>public static class ShortBigLists.ListBigList extends AbstractShortBigList implements java.io.Serializable
AbstractShortBigList.ShortSubList| Modifier and Type | Method | Description |
|---|---|---|
void |
add(long index,
short key) |
Inserts the specified element at the specified position in this type-specific
big list (optional operation).
|
boolean |
add(short key) |
Ensures that this collection contains the specified element (optional
operation).
|
boolean |
addAll(long index,
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 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).
|
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(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.
|
boolean |
addAll(java.util.Collection<? extends java.lang.Short> c) |
|
void |
clear() |
|
boolean |
contains(short key) |
Returns true if this list contains the specified element.
|
boolean |
containsAll(ShortCollection c) |
Checks whether this collection contains all elements from the given
type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
|
short |
getShort(long index) |
Returns the element at the specified position.
|
int |
hashCode() |
Returns the hash code for this big list, which is identical to
List.hashCode(). |
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.
|
boolean |
isEmpty() |
Checks whether the stack is empty.
|
ShortBigListIterator |
iterator() |
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(short k) |
Returns the index of the last 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 index) |
Returns a type-specific list iterator on this type-specific big list starting
at a given index.
|
boolean |
removeAll(ShortCollection c) |
Remove from this collection all elements in the given type-specific
collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
|
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.
|
boolean |
retainAll(ShortCollection c) |
Retains in this collection only elements from the given type-specific
collection.
|
boolean |
retainAll(java.util.Collection<?> c) |
|
short |
set(long index,
short k) |
Replaces the element at the specified position in this big list with the
specified element (optional operation).
|
void |
size(long size) |
Sets the size of this big list.
|
long |
size64() |
Returns the size of this data structure as a long.
|
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. |
<T> T[] |
toArray(T[] a) |
|
short[] |
toShortArray() |
Returns a primitive type array containing the items of this collection.
|
short[] |
toShortArray(short[] a) |
Deprecated.
|
add, addElements, addElements, compareTo, equals, get, getElements, indexOf, lastIndexOf, peek, peekShort, pop, popShort, push, push, rem, remove, set, size, top, topShort, toStringadd, contains, remove, toArrayadd, contains, remove, removeIf, removeIf, toArrayforEach, forEachpublic long size64()
Size64public void size(long size)
BigListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
size in interface BigList<java.lang.Short>size in class AbstractShortBigListsize - the new size.public ShortBigListIterator iterator()
AbstractShortBigList
Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the
corresponding type-specific class, but was weakened by the fact that this
interface extends Collection.
This implementation delegates to AbstractShortBigList.listIterator().
iterator in interface java.util.Collection<java.lang.Short>iterator in interface java.lang.Iterable<java.lang.Short>iterator in interface ShortBigListiterator in interface ShortCollectioniterator in interface ShortIterableiterator in class AbstractShortBigListIterable.iterator()public ShortBigListIterator listIterator()
AbstractShortBigList
Note that this specification strengthens the one given in
BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<java.lang.Short>listIterator in interface ShortBigListlistIterator in class AbstractShortBigListBigList.listIterator()public ShortBigListIterator listIterator(long index)
AbstractShortBigList
Note that this specification strengthens the one given in
BigList.listIterator(long).
This implementation is based on the random-access methods.
listIterator in interface BigList<java.lang.Short>listIterator in interface ShortBigListlistIterator in class AbstractShortBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigListaddAll in interface BigList<java.lang.Short>addAll in class AbstractShortBigListindex - 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 ShortBigList subList(long from, long to)
ShortBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in
BigList.subList(long,long).
subList in interface BigList<java.lang.Short>subList in interface ShortBigListsubList in class AbstractShortBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(short key)
AbstractShortBigList
This implementation delegates to indexOf().
contains in interface ShortCollectioncontains in class AbstractShortBigListCollection.contains(Object)public short[] toShortArray()
ShortCollectiontoShortArray in interface ShortCollectiontoShortArray in class AbstractShortCollectionCollection.toArray()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).@Deprecated public short[] toShortArray(short[] a)
AbstractShortCollection
Note that, contrarily to Collection.toArray(Object[]), this methods
just writes all elements of this collection: no special value will be added
after the last one.
toShortArray in interface ShortCollectiontoShortArray in class AbstractShortCollectiona - if this array is big enough, it will be used to store this
collection.Collection.toArray(Object[])public boolean addAll(long index,
ShortCollection c)
AbstractShortBigList
This implementation delegates to the type-specific version of
AbstractShortBigList.addAll(long, Collection).
addAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean addAll(ShortCollection c)
AbstractShortBigList
This implementation delegates to the type-specific version of
AbstractShortBigList.addAll(long, Collection).
addAll in interface ShortCollectionaddAll in class AbstractShortBigListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(long index,
ShortBigList c)
AbstractShortBigList
This implementation delegates to the type-specific version of
AbstractShortBigList.addAll(long, Collection).
addAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean addAll(ShortBigList c)
AbstractShortBigList
This implementation delegates to the type-specific list version of
AbstractShortBigList.addAll(long, Collection).
addAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean containsAll(ShortCollection c)
ShortCollectioncontainsAll in interface ShortCollectioncontainsAll in class AbstractShortCollectionc - a type-specific collection.true if this collection contains all elements of the
argument.Collection.containsAll(Collection)public boolean removeAll(ShortCollection c)
ShortCollectionremoveAll in interface ShortCollectionremoveAll in class AbstractShortCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(ShortCollection c)
ShortCollectionretainAll in interface ShortCollectionretainAll in class AbstractShortCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public void add(long index,
short key)
AbstractShortBigList
This implementation always throws an UnsupportedOperationException.
add in interface ShortBigListadd in class AbstractShortBigListBigList.add(long,Object)public boolean add(short key)
AbstractShortBigList
This implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of
BigList.add(long, Object).
add in interface ShortCollectionadd in class AbstractShortBigListCollection.add(Object)public short getShort(long index)
ShortBigListgetShort in interface ShortBigListBigList.get(long)public long indexOf(short k)
ShortBigListindexOf in interface ShortBigListindexOf in class AbstractShortBigListBigList.indexOf(Object)public long lastIndexOf(short k)
ShortBigListlastIndexOf in interface ShortBigListlastIndexOf in class AbstractShortBigListBigList.lastIndexOf(Object)public short removeShort(long index)
AbstractShortBigList
This implementation always throws an UnsupportedOperationException.
removeShort in interface ShortBigListremoveShort in class AbstractShortBigListBigList.remove(long)public short set(long index,
short k)
AbstractShortBigList
This implementation always throws an UnsupportedOperationException.
set in interface ShortBigListset in class AbstractShortBigListBigList.set(long,Object)public boolean isEmpty()
Stackpublic <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Short>toArray in class java.util.AbstractCollection<java.lang.Short>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Short>containsAll in class java.util.AbstractCollection<java.lang.Short>public boolean addAll(java.util.Collection<? extends java.lang.Short> c)
AbstractShortBigList
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection).
addAll in interface java.util.Collection<java.lang.Short>addAll in class AbstractShortBigListpublic boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Short>removeAll in class java.util.AbstractCollection<java.lang.Short>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Short>retainAll in class java.util.AbstractCollection<java.lang.Short>public void clear()
AbstractShortBigList
This implementation delegates to AbstractShortBigList.removeElements(long, long).
clear in interface java.util.Collection<java.lang.Short>clear in class AbstractShortBigListpublic int hashCode()
AbstractShortBigListList.hashCode().hashCode in interface java.util.Collection<java.lang.Short>hashCode in class AbstractShortBigList