public static class IntBigLists.ListBigList extends AbstractIntBigList implements Serializable
AbstractIntBigList.IntSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int key)
Ensures that this collection contains the specified element (optional
operation).
|
void |
add(long index,
int key)
Inserts the specified element at the specified position in this
type-specific big list (optional operation).
|
boolean |
addAll(Collection<? extends Integer> c)
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection). |
boolean |
addAll(IntBigList 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(IntCollection c)
Adds all elements of the given type-specific collection to this
collection.
|
boolean |
addAll(long index,
Collection<? extends Integer> c)
Adds all of the elements in the specified collection to this list
(optional operation).
|
boolean |
addAll(long index,
IntBigList 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,
IntCollection 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 |
clear()
This implementation delegates to
AbstractIntBigList.removeElements(long, long). |
boolean |
contains(int key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(IntCollection c)
Checks whether this collection contains all elements from the given
type-specific collection.
|
int |
getInt(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(int 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.
|
IntBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(int 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.
|
IntBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
IntBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list
starting at a given index.
|
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(IntCollection c)
Remove from this collection all elements in the given type-specific
collection.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
int |
removeInt(long index)
Removes the element at the specified position.
|
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(IntCollection c)
Retains in this collection only elements from the given type-specific
collection.
|
int |
set(long index,
int 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.
|
IntBigList |
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) |
int[] |
toIntArray()
Returns a primitive type array containing the items of this collection.
|
int[] |
toIntArray(int[] a)
Deprecated.
|
add, addAll, addElements, addElements, compareTo, equals, get, getElements, getInt, indexOf, lastIndexOf, listIterator, peek, peekInt, pop, popInt, push, push, rem, remove, remove, removeInt, set, set, size, size, top, topInt, toStringadd, contains, intIterator, remove, toArraytoArrayadd, contains, intIterator, remove, toArrayparallelStream, removeIf, spliterator, stream, toArraypublic 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<Integer>size in class AbstractIntBigListsize - the new size.public IntBigListIterator iterator()
AbstractIntBigList
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 AbstractIntBigList.listIterator().
iterator in interface IntBigListiterator in interface IntCollectioniterator in interface IntIterableiterator in interface Iterable<Integer>iterator in interface Collection<Integer>iterator in class AbstractIntBigListIterable.iterator()public IntBigListIterator listIterator()
AbstractIntBigList
Note that this specification strengthens the one given in
BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<Integer>listIterator in interface IntBigListlistIterator in class AbstractIntBigListBigList.listIterator()public IntBigListIterator listIterator(long index)
AbstractIntBigList
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<Integer>listIterator in interface IntBigListlistIterator in class AbstractIntBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
Collection<? extends Integer> c)
AbstractIntBigListaddAll in interface BigList<Integer>addAll in class AbstractIntBigListindex - 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 IntBigList subList(long from, long to)
IntBigListfrom, inclusive, to the index
to, exclusive.
Note that this specification strengthens the one given in
BigList.subList(long,long).
subList in interface BigList<Integer>subList in interface IntBigListsubList in class AbstractIntBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(int key)
AbstractIntBigList
This implementation delegates to indexOf().
contains in interface IntCollectioncontains in class AbstractIntBigListCollection.contains(Object)public int[] toIntArray()
IntCollectiontoIntArray in interface IntCollectiontoIntArray in class AbstractIntCollectionCollection.toArray()public void removeElements(long from,
long to)
AbstractIntBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface IntBigListremoveElements in class AbstractIntBigListfrom - the start index (inclusive).to - the end index (exclusive).@Deprecated public int[] toIntArray(int[] a)
IntCollection
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.
toIntArray in interface IntCollectiontoIntArray in class AbstractIntCollectiona - if this array is big enough, it will be used to store this
collection.Collection.toArray(Object[])public boolean addAll(long index,
IntCollection c)
AbstractIntBigList
This implementation delegates to the type-specific version of
AbstractIntBigList.addAll(long, Collection).
addAll in interface IntBigListaddAll in class AbstractIntBigListList.addAll(int,java.util.Collection)public boolean addAll(IntCollection c)
AbstractIntBigList
This implementation delegates to the type-specific version of
AbstractIntBigList.addAll(long, Collection).
addAll in interface IntCollectionaddAll in class AbstractIntBigListc - a type-specific collection.true if this collection changed as a result of the
call.Collection.addAll(Collection)public boolean addAll(long index,
IntBigList c)
AbstractIntBigList
This implementation delegates to the type-specific version of
AbstractIntBigList.addAll(long, Collection).
addAll in interface IntBigListaddAll in class AbstractIntBigListList.addAll(int,java.util.Collection)public boolean addAll(IntBigList c)
AbstractIntBigList
This implementation delegates to the type-specific list version of
AbstractIntBigList.addAll(long, Collection).
addAll in interface IntBigListaddAll in class AbstractIntBigListList.addAll(int,java.util.Collection)public boolean containsAll(IntCollection c)
IntCollectioncontainsAll in interface IntCollectioncontainsAll in class AbstractIntCollectionc - a type-specific collection.true if this collection contains all elements of the
argument.Collection.containsAll(Collection)public boolean removeAll(IntCollection c)
IntCollectionremoveAll in interface IntCollectionremoveAll in class AbstractIntCollectionc - a type-specific collection.true if this collection changed as a result of the
call.Collection.removeAll(Collection)public boolean retainAll(IntCollection c)
IntCollectionretainAll in interface IntCollectionretainAll in class AbstractIntCollectionc - a type-specific collection.true if this collection changed as a result of the
call.Collection.retainAll(Collection)public void add(long index,
int key)
AbstractIntBigList
This implementation always throws an
UnsupportedOperationException.
add in interface IntBigListadd in class AbstractIntBigListBigList.add(long,Object)public boolean add(int key)
AbstractIntBigList
This implementation always throws an
UnsupportedOperationException.
This implementation delegates to the type-specific version of
BigList.add(long, Object).
add in interface IntCollectionadd in class AbstractIntBigListCollection.add(Object)public int getInt(long index)
IntBigListgetInt in interface IntBigListBigList.get(long)public long indexOf(int k)
IntBigListindexOf in interface IntBigListindexOf in class AbstractIntBigListBigList.indexOf(Object)public long lastIndexOf(int k)
IntBigListlastIndexOf in interface IntBigListlastIndexOf in class AbstractIntBigListBigList.lastIndexOf(Object)public int removeInt(long index)
AbstractIntBigList
This implementation always throws an
UnsupportedOperationException.
removeInt in interface IntBigListremoveInt in class AbstractIntBigListBigList.remove(long)public int set(long index,
int k)
AbstractIntBigList
This implementation always throws an
UnsupportedOperationException.
set in interface IntBigListset in class AbstractIntBigListBigList.set(long,Object)public boolean isEmpty()
StackisEmpty in interface Stack<Integer>isEmpty in interface Collection<Integer>isEmpty in class AbstractCollection<Integer>public <T> T[] toArray(T[] a)
toArray in interface Collection<Integer>toArray in class AbstractCollection<Integer>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Integer>containsAll in class AbstractCollection<Integer>public boolean addAll(Collection<? extends Integer> c)
AbstractIntBigList
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection).
addAll in interface Collection<Integer>addAll in class AbstractIntBigListpublic boolean removeAll(Collection<?> c)
removeAll in interface Collection<Integer>removeAll in class AbstractCollection<Integer>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Integer>retainAll in class AbstractCollection<Integer>public void clear()
AbstractIntBigList
This implementation delegates to AbstractIntBigList.removeElements(long, long).
clear in interface Collection<Integer>clear in class AbstractIntBigListpublic int hashCode()
AbstractIntBigListList.hashCode().hashCode in interface Collection<Integer>hashCode in class AbstractIntBigList