public static class IntBigLists.ListBigList extends AbstractIntBigList implements java.io.Serializable
AbstractIntBigList.IntRandomAccessSubList, 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(java.util.Collection<? extends java.lang.Integer> c) |
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,
java.util.Collection<? extends java.lang.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() |
boolean |
contains(int key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(java.util.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(java.util.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(java.util.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, addElements, addElements, compareTo, equals, forEach, get, getElements, indexOf, lastIndexOf, peek, peekInt, pop, popInt, push, push, rem, remove, set, setElements, size, top, topInt, toString
add, contains, forEach, remove, removeIf, toArray
addAll, addAll, setElements, setElements, spliterator
add, contains, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray
forEach, forEach
public long size64()
Size64
public void size(long size)
BigList
If 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.Integer>
size
in class AbstractIntBigList
size
- the new size.public IntBigListIterator iterator()
AbstractIntBigList
iterator
in interface IntBigList
iterator
in interface IntCollection
iterator
in interface IntIterable
iterator
in interface java.lang.Iterable<java.lang.Integer>
iterator
in interface java.util.Collection<java.lang.Integer>
iterator
in class AbstractIntBigList
Iterable.iterator()
public IntBigListIterator listIterator()
AbstractIntBigList
listIterator
in interface BigList<java.lang.Integer>
listIterator
in interface IntBigList
listIterator
in class AbstractIntBigList
BigList.listIterator()
public IntBigListIterator listIterator(long index)
AbstractIntBigList
listIterator
in interface BigList<java.lang.Integer>
listIterator
in interface IntBigList
listIterator
in class AbstractIntBigList
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 java.lang.Integer> c)
AbstractIntBigList
addAll
in interface BigList<java.lang.Integer>
addAll
in class AbstractIntBigList
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 IntBigList subList(long from, long to)
IntBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Integer>
subList
in interface IntBigList
subList
in class AbstractIntBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(int key)
AbstractIntBigList
contains
in interface IntCollection
contains
in class AbstractIntBigList
Collection.contains(Object)
public int[] toIntArray()
IntCollection
toIntArray
in interface IntCollection
toIntArray
in class AbstractIntCollection
Collection.toArray()
public void removeElements(long from, long to)
AbstractIntBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface IntBigList
removeElements
in class AbstractIntBigList
from
- the start index (inclusive).to
- the end index (exclusive).@Deprecated public int[] toIntArray(int[] a)
AbstractIntCollection
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 IntCollection
toIntArray
in class AbstractIntCollection
a
- 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
addAll
in interface IntBigList
addAll
in class AbstractIntBigList
List.addAll(int,java.util.Collection)
public boolean addAll(IntCollection c)
AbstractIntBigList
addAll
in interface IntCollection
addAll
in class AbstractIntBigList
c
- 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)
IntBigList
addAll
in interface IntBigList
BigList.addAll(long,Collection)
public boolean addAll(IntBigList c)
IntBigList
addAll
in interface IntBigList
Collection.addAll(Collection)
public boolean containsAll(IntCollection c)
IntCollection
containsAll
in interface IntCollection
containsAll
in class AbstractIntCollection
c
- a type-specific collection.true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean removeAll(IntCollection c)
IntCollection
removeAll
in interface IntCollection
removeAll
in class AbstractIntCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(IntCollection c)
IntCollection
retainAll
in interface IntCollection
retainAll
in class AbstractIntCollection
c
- 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
add
in interface IntBigList
add
in class AbstractIntBigList
BigList.add(long,Object)
public boolean add(int key)
AbstractIntBigList
add
in interface IntCollection
add
in class AbstractIntBigList
Collection.add(Object)
public int getInt(long index)
IntBigList
getInt
in interface IntBigList
BigList.get(long)
public long indexOf(int k)
IntBigList
indexOf
in interface IntBigList
indexOf
in class AbstractIntBigList
BigList.indexOf(Object)
public long lastIndexOf(int k)
IntBigList
lastIndexOf
in interface IntBigList
lastIndexOf
in class AbstractIntBigList
BigList.lastIndexOf(Object)
public int removeInt(long index)
AbstractIntBigList
removeInt
in interface IntBigList
removeInt
in class AbstractIntBigList
BigList.remove(long)
public int set(long index, int k)
AbstractIntBigList
set
in interface IntBigList
set
in class AbstractIntBigList
BigList.set(long,Object)
public boolean isEmpty()
Stack
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Integer>
toArray
in class java.util.AbstractCollection<java.lang.Integer>
public boolean containsAll(java.util.Collection<?> c)
AbstractIntCollection
containsAll
in interface java.util.Collection<java.lang.Integer>
containsAll
in class AbstractIntCollection
public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
AbstractIntBigList
addAll
in interface java.util.Collection<java.lang.Integer>
addAll
in class AbstractIntBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractIntCollection
removeAll
in interface java.util.Collection<java.lang.Integer>
removeAll
in class AbstractIntCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractIntCollection
retainAll
in interface java.util.Collection<java.lang.Integer>
retainAll
in class AbstractIntCollection
public void clear()
AbstractIntBigList
clear
in interface java.util.Collection<java.lang.Integer>
clear
in class AbstractIntBigList
public int hashCode()
AbstractIntBigList
List.hashCode()
.hashCode
in interface java.util.Collection<java.lang.Integer>
hashCode
in class AbstractIntBigList