public static class IntBigLists.ListBigList extends AbstractIntBigList implements Serializable
AbstractIntBigList.IntSubList
Modifier and Type | Method and Description |
---|---|
boolean |
add(int key) |
void |
add(long index,
int key) |
boolean |
addAll(Collection<? extends Integer> c)
Delegates to a more generic method.
|
boolean |
addAll(IntBigList c) |
boolean |
addAll(IntCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(long index,
Collection<? extends Integer> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
boolean |
addAll(long index,
IntBigList c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
IntCollection c)
Delegates to a more generic method.
|
void |
clear() |
boolean |
contains(int key) |
boolean |
containsAll(Collection<?> c)
Checks whether this collection contains all elements from the given collection.
|
boolean |
containsAll(IntCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
int |
getInt(long index) |
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode() . |
long |
indexOf(int k) |
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) |
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)
Remove from this collection all elements in the given collection.
|
boolean |
removeAll(IntCollection 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.
|
int |
removeInt(long index) |
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
boolean |
retainAll(IntCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
set(long index,
int 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.
|
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)
Returns an containing the items of this collection;
the runtime type of the returned array is that of the specified array.
|
int[] |
toIntArray()
Returns a primitive type array containing the items of this collection.
|
int[] |
toIntArray(int[] a)
Returns a primitive type array containing the items of this collection.
|
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, top, topInt, toString
add, contains, intIterator, rem, remove, toArray, toArray
intIterator, toArray
add, contains, remove, toArray
public long size64()
Size64
@Deprecated public int size()
Size64
Integer.MAX_VALUE
.size
in interface Size64
size
in interface Collection<Integer>
size
in class AbstractIntBigList
Integer.MAX_VALUE
.Collection.size()
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<Integer>
size
in class AbstractIntBigList
size
- the new size.public IntBigListIterator iterator()
IntCollection
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
.
iterator
in interface IntBigList
iterator
in interface IntCollection
iterator
in interface IntIterable
iterator
in interface Iterable<Integer>
iterator
in interface Collection<Integer>
iterator
in class AbstractIntBigList
List.iterator()
public IntBigListIterator listIterator()
IntBigList
listIterator
in interface BigList<Integer>
listIterator
in interface IntBigList
listIterator
in class AbstractIntBigList
List.listIterator()
public boolean addAll(long index, Collection<? extends Integer> c)
BigList
addAll
in interface BigList<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 IntBigListIterator listIterator(long index)
IntBigList
listIterator
in interface BigList<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 IntBigList subList(long from, long to)
IntBigList
from
, 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 IntBigList
subList
in class AbstractIntBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(int key)
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).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 IntCollection
toIntArray
in class AbstractIntCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public void add(long index, int key)
add
in interface IntBigList
add
in class AbstractIntBigList
List.add(int,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(long index, IntBigList c)
AbstractIntBigList
addAll
in interface IntBigList
addAll
in class AbstractIntBigList
List.addAll(int,java.util.Collection)
public boolean add(int key)
add
in interface IntCollection
add
in class AbstractIntBigList
Collection.add(Object)
public boolean addAll(IntBigList c)
addAll
in interface IntBigList
addAll
in class AbstractIntBigList
List.addAll(int,java.util.Collection)
public int getInt(long index)
getInt
in interface IntBigList
BigList.get(long)
public long indexOf(int k)
indexOf
in interface IntBigList
indexOf
in class AbstractIntBigList
BigList.indexOf(Object)
public long lastIndexOf(int k)
lastIndexOf
in interface IntBigList
lastIndexOf
in class AbstractIntBigList
BigList.lastIndexOf(Object)
public int removeInt(long index)
removeInt
in interface IntBigList
removeInt
in class AbstractIntBigList
BigList.remove(long)
public int set(long index, int k)
set
in interface IntBigList
set
in class AbstractIntBigList
BigList.set(long,Object)
public boolean addAll(IntCollection c)
AbstractIntCollection
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 containsAll(IntCollection c)
AbstractIntCollection
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)
AbstractIntCollection
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)
AbstractIntCollection
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 boolean isEmpty()
Stack
isEmpty
in interface Stack<Integer>
isEmpty
in interface Collection<Integer>
isEmpty
in class AbstractIntCollection
public <T> T[] toArray(T[] a)
IntCollection
Warning: 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 IntCollection
toArray
in interface Collection<Integer>
toArray
in class AbstractIntCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean containsAll(Collection<?> c)
AbstractIntCollection
containsAll
in interface Collection<Integer>
containsAll
in class AbstractIntCollection
c
- a collection.true
if this collection contains all elements of the argument.public boolean addAll(Collection<? extends Integer> c)
AbstractIntBigList
addAll
in interface Collection<Integer>
addAll
in class AbstractIntBigList
c
- a collection.true
if this collection changed as a result of the call.public boolean removeAll(Collection<?> c)
AbstractIntCollection
removeAll
in interface Collection<Integer>
removeAll
in class AbstractIntCollection
c
- a collection.true
if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractIntCollection
retainAll
in interface Collection<Integer>
retainAll
in class AbstractIntCollection
c
- a collection.true
if this collection changed as a result of the call.public void clear()
clear
in interface Collection<Integer>
clear
in class AbstractCollection<Integer>
public int hashCode()
AbstractIntBigList
List.hashCode()
.hashCode
in interface Collection<Integer>
hashCode
in class AbstractIntBigList