public static class ShortBigLists.ListBigList extends AbstractShortBigList implements Serializable
AbstractShortBigList.ShortSubList| Modifier and Type | Method and Description |
|---|---|
void |
add(long index,
short key) |
boolean |
add(short key) |
boolean |
addAll(Collection<? extends Short> c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
Collection<? extends Short> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
boolean |
addAll(long index,
ShortBigList c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
ShortCollection c)
Delegates to a more generic method.
|
boolean |
addAll(ShortBigList c) |
boolean |
addAll(ShortCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
boolean |
contains(short key) |
boolean |
containsAll(Collection<?> c)
Checks whether this collection contains all elements from the given collection.
|
boolean |
containsAll(ShortCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
short |
getShort(long index) |
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode(). |
long |
indexOf(short k) |
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) |
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(Collection<?> c)
Remove from this collection all elements in the given collection.
|
boolean |
removeAll(ShortCollection c)
Remove from this collection all elements in the given type-specific collection.
|
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
short |
removeShort(long index) |
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
boolean |
retainAll(ShortCollection c)
Retains in this collection only elements from the given type-specific collection.
|
short |
set(long index,
short k) |
int |
size()
Deprecated.
|
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)
Returns an containing the items of this collection;
the runtime type of the returned array is that of the specified array.
|
short[] |
toShortArray()
Returns a primitive type array containing the items of this collection.
|
short[] |
toShortArray(short[] a)
Returns a primitive type array containing the items of this collection.
|
add, addAll, addElements, addElements, compareTo, equals, get, getElements, getShort, indexOf, lastIndexOf, listIterator, peek, peekShort, pop, popShort, push, push, rem, remove, remove, removeShort, set, set, size, top, topShort, toStringadd, contains, rem, remove, shortIterator, toArray, toArrayshortIterator, toArrayadd, contains, remove, toArraypublic long size64()
Size64@Deprecated public int size()
Size64Integer.MAX_VALUE.size in interface Size64size in interface Collection<Short>size in class AbstractShortBigListInteger.MAX_VALUE.Collection.size()public 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<Short>size in class AbstractShortBigListsize - the new size.public ShortBigListIterator iterator()
ShortCollectionNote 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.
iterator in interface ShortBigListiterator in interface ShortCollectioniterator in interface ShortIterableiterator in interface Iterable<Short>iterator in interface Collection<Short>iterator in class AbstractShortBigListList.iterator()public ShortBigListIterator listIterator()
ShortBigListlistIterator in interface BigList<Short>listIterator in interface ShortBigListlistIterator in class AbstractShortBigListList.listIterator()public boolean addAll(long index,
Collection<? extends Short> c)
BigListaddAll in interface BigList<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 ShortBigListIterator listIterator(long index)
ShortBigListlistIterator in interface BigList<Short>listIterator in interface ShortBigListlistIterator in class AbstractShortBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)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<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)
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).public short[] toShortArray(short[] a)
ShortCollectionNote 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 void add(long index,
short key)
add in interface ShortBigListadd in class AbstractShortBigListList.add(int,Object)public boolean addAll(long index,
ShortCollection c)
AbstractShortBigListaddAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean addAll(long index,
ShortBigList c)
AbstractShortBigListaddAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public boolean add(short key)
add in interface ShortCollectionadd in class AbstractShortBigListCollection.add(Object)public boolean addAll(ShortBigList c)
addAll in interface ShortBigListaddAll in class AbstractShortBigListList.addAll(int,java.util.Collection)public short getShort(long index)
getShort in interface ShortBigListBigList.get(long)public long indexOf(short k)
indexOf in interface ShortBigListindexOf in class AbstractShortBigListBigList.indexOf(Object)public long lastIndexOf(short k)
lastIndexOf in interface ShortBigListlastIndexOf in class AbstractShortBigListBigList.lastIndexOf(Object)public short removeShort(long index)
removeShort in interface ShortBigListremoveShort in class AbstractShortBigListBigList.remove(long)public short set(long index,
short k)
set in interface ShortBigListset in class AbstractShortBigListBigList.set(long,Object)public boolean addAll(ShortCollection c)
AbstractShortCollectionaddAll 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 containsAll(ShortCollection c)
AbstractShortCollectioncontainsAll 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)
AbstractShortCollectionremoveAll 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)
AbstractShortCollectionretainAll 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 boolean isEmpty()
StackisEmpty in interface Stack<Short>isEmpty in interface Collection<Short>isEmpty in class AbstractShortCollectionpublic <T> T[] toArray(T[] a)
ShortCollectionWarning: 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.
toArray in interface ShortCollectiontoArray in interface Collection<Short>toArray in class AbstractShortCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean containsAll(Collection<?> c)
AbstractShortCollectioncontainsAll in interface Collection<Short>containsAll in class AbstractShortCollectionc - a collection.true if this collection contains all elements of the argument.public boolean addAll(Collection<? extends Short> c)
AbstractShortBigListaddAll in interface Collection<Short>addAll in class AbstractShortBigListc - a collection.true if this collection changed as a result of the call.public boolean removeAll(Collection<?> c)
AbstractShortCollectionremoveAll in interface Collection<Short>removeAll in class AbstractShortCollectionc - a collection.true if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractShortCollectionretainAll in interface Collection<Short>retainAll in class AbstractShortCollectionc - a collection.true if this collection changed as a result of the call.public void clear()
clear in interface Collection<Short>clear in class AbstractCollection<Short>public int hashCode()
AbstractShortBigListList.hashCode().hashCode in interface Collection<Short>hashCode in class AbstractShortBigList