public static class ObjectBigLists.ListBigList<K> extends AbstractObjectBigList<K> implements java.io.Serializable
AbstractObjectBigList.ObjectSubList<K>| Modifier and Type | Method and Description |
|---|---|
boolean |
add(K key)
This implementation delegates to the type-specific version of
BigList.add(long, Object). |
void |
add(long index,
K key)
Inserts the specified element at the specified position in this big list (optional operation).
|
boolean |
addAll(java.util.Collection<? extends K> c)
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection). |
boolean |
addAll(long index,
java.util.Collection<? extends K> c)
Adds all of the elements in the specified collection to this list (optional
operation).
|
void |
clear()
This implementation delegates to
AbstractObjectBigList.removeElements(long, long). |
boolean |
contains(java.lang.Object key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(java.util.Collection<?> c) |
K |
get(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(java.lang.Object k)
Returns the index of the first occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
|
boolean |
isEmpty()
Checks whether the stack is empty.
|
ObjectBigListIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(java.lang.Object k)
Returns the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
|
ObjectBigListIterator<K> |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
ObjectBigListIterator<K> |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting
at a given index.
|
K |
remove(long index)
Removes the element at the specified position.
|
boolean |
removeAll(java.util.Collection<?> c) |
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
boolean |
retainAll(java.util.Collection<?> c) |
K |
set(long index,
K 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.
|
ObjectBigList<K> |
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. |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
addElements, addElements, compareTo, equals, getElements, peek, pop, push, size, top, toStringpublic 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.
public ObjectBigListIterator<K> iterator()
AbstractObjectBigList
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 AbstractObjectBigList.listIterator().
iterator in interface ObjectBigList<K>iterator in interface ObjectCollection<K>iterator in interface ObjectIterable<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in class AbstractObjectBigList<K>Iterable.iterator()public ObjectBigListIterator<K> listIterator()
AbstractObjectBigList
Note that this specification strengthens the one given in
BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<K>listIterator in interface ObjectBigList<K>listIterator in class AbstractObjectBigList<K>BigList.listIterator()public ObjectBigListIterator<K> listIterator(long index)
AbstractObjectBigList
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<K>listIterator in interface ObjectBigList<K>listIterator in class AbstractObjectBigList<K>index - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
java.util.Collection<? extends K> c)
AbstractObjectBigListaddAll in interface BigList<K>addAll in class AbstractObjectBigList<K>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 ObjectBigList<K> subList(long from, long to)
ObjectBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in
BigList.subList(long,long).
subList in interface BigList<K>subList in interface ObjectBigList<K>subList in class AbstractObjectBigList<K>from - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(java.lang.Object key)
AbstractObjectBigList
This implementation delegates to indexOf().
contains in interface java.util.Collection<K>contains in class AbstractObjectBigList<K>Collection.contains(Object)public java.lang.Object[] toArray()
public void removeElements(long from,
long to)
AbstractObjectBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface ObjectBigList<K>removeElements in class AbstractObjectBigList<K>from - the start index (inclusive).to - the end index (exclusive).public void add(long index,
K key)
AbstractObjectBigList
This implementation always throws an UnsupportedOperationException.
public boolean add(K key)
AbstractObjectBigList
This implementation delegates to the type-specific version of
BigList.add(long, Object).
add in interface java.util.Collection<K>add in class AbstractObjectBigList<K>public K get(long index)
BigListpublic long indexOf(java.lang.Object k)
BigListindexOf in interface BigList<K>indexOf in class AbstractObjectBigList<K>k - the object to search for.List.indexOf(Object)public long lastIndexOf(java.lang.Object k)
BigListlastIndexOf in interface BigList<K>lastIndexOf in class AbstractObjectBigList<K>k - the object to search for.List.lastIndexOf(Object)public K remove(long index)
AbstractObjectBigList
This implementation always throws an UnsupportedOperationException.
public K set(long index, K k)
AbstractObjectBigList
This implementation always throws an UnsupportedOperationException.
public boolean isEmpty()
Stackpublic <T> T[] toArray(T[] a)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends K> c)
AbstractObjectBigList
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection).
addAll in interface java.util.Collection<K>addAll in class AbstractObjectBigList<K>public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void clear()
AbstractObjectBigList
This implementation delegates to AbstractObjectBigList.removeElements(long, long).
clear in interface java.util.Collection<K>clear in class AbstractObjectBigList<K>public int hashCode()
AbstractObjectBigListList.hashCode().hashCode in interface java.util.Collection<K>hashCode in class AbstractObjectBigList<K>