public static class BooleanBigLists.ListBigList extends AbstractBooleanBigList implements Serializable
AbstractBooleanBigList.BooleanSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
add(boolean key)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
boolean key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(BooleanBigList 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(BooleanCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(Collection<? extends Boolean> c)
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection). |
boolean |
addAll(long index,
BooleanBigList 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,
BooleanCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
Collection<? extends Boolean> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
void |
clear()
This implementation delegates to
AbstractBooleanBigList.removeElements(long, long). |
boolean |
contains(boolean key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(BooleanCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(Collection<?> c) |
boolean |
getBoolean(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(boolean 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.
|
BooleanBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(boolean 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.
|
BooleanBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
BooleanBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
removeAll(BooleanCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(Collection<?> c) |
boolean |
removeBoolean(long index)
Removes the element at the specified position.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
boolean |
retainAll(BooleanCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(Collection<?> c) |
boolean |
set(long index,
boolean 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.
|
BooleanBigList |
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) |
boolean[] |
toBooleanArray()
Returns a primitive type array containing the items of this collection.
|
boolean[] |
toBooleanArray(boolean[] a)
Deprecated.
|
add, addElements, addElements, compareTo, equals, get, getElements, indexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, rem, remove, set, size, top, topBoolean, toStringadd, contains, remove, toArraytoArrayadd, contains, remove, toArrayparallelStream, removeIf, spliterator, stream, toArrayforEach, forEachpublic 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<Boolean>size in class AbstractBooleanBigListsize - the new size.public BooleanBigListIterator iterator()
AbstractBooleanBigListNote 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 AbstractBooleanBigList.listIterator().
iterator in interface BooleanBigListiterator in interface BooleanCollectioniterator in interface BooleanIterableiterator in interface Iterable<Boolean>iterator in interface Collection<Boolean>iterator in class AbstractBooleanBigListIterable.iterator()public BooleanBigListIterator listIterator()
AbstractBooleanBigListNote that this specification strengthens the one given in BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<Boolean>listIterator in interface BooleanBigListlistIterator in class AbstractBooleanBigListBigList.listIterator()public BooleanBigListIterator listIterator(long index)
AbstractBooleanBigListNote that this specification strengthens the one given in BigList.listIterator(long).
This implementation is based on the random-access methods.
listIterator in interface BigList<Boolean>listIterator in interface BooleanBigListlistIterator in class AbstractBooleanBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
Collection<? extends Boolean> c)
AbstractBooleanBigListaddAll in interface BigList<Boolean>addAll in class AbstractBooleanBigListindex - 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 BooleanBigList subList(long from, long to)
BooleanBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long).
subList in interface BigList<Boolean>subList in interface BooleanBigListsubList in class AbstractBooleanBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(boolean key)
AbstractBooleanBigListThis implementation delegates to indexOf().
contains in interface BooleanCollectioncontains in class AbstractBooleanBigListCollection.contains(Object)public boolean[] toBooleanArray()
BooleanCollectiontoBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectionCollection.toArray()public void removeElements(long from,
long to)
AbstractBooleanBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface BooleanBigListremoveElements in class AbstractBooleanBigListfrom - the start index (inclusive).to - the end index (exclusive).@Deprecated public boolean[] toBooleanArray(boolean[] a)
AbstractBooleanCollectionNote 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.
toBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean addAll(long index,
BooleanCollection c)
AbstractBooleanBigListThis implementation delegates to the type-specific version of AbstractBooleanBigList.addAll(long, Collection).
addAll in interface BooleanBigListaddAll in class AbstractBooleanBigListList.addAll(int,java.util.Collection)public boolean addAll(BooleanCollection c)
AbstractBooleanBigListThis implementation delegates to the type-specific version of AbstractBooleanBigList.addAll(long, Collection).
addAll in interface BooleanCollectionaddAll in class AbstractBooleanBigListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(long index,
BooleanBigList c)
AbstractBooleanBigListThis implementation delegates to the type-specific version of AbstractBooleanBigList.addAll(long, Collection).
addAll in interface BooleanBigListaddAll in class AbstractBooleanBigListList.addAll(int,java.util.Collection)public boolean addAll(BooleanBigList c)
AbstractBooleanBigListThis implementation delegates to the type-specific list version of AbstractBooleanBigList.addAll(long, Collection).
addAll in interface BooleanBigListaddAll in class AbstractBooleanBigListList.addAll(int,java.util.Collection)public boolean containsAll(BooleanCollection c)
BooleanCollectioncontainsAll in interface BooleanCollectioncontainsAll in class AbstractBooleanCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean removeAll(BooleanCollection c)
BooleanCollectionremoveAll in interface BooleanCollectionremoveAll in class AbstractBooleanCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(BooleanCollection c)
BooleanCollectionretainAll in interface BooleanCollectionretainAll in class AbstractBooleanCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public void add(long index,
boolean key)
AbstractBooleanBigListThis implementation always throws an UnsupportedOperationException.
add in interface BooleanBigListadd in class AbstractBooleanBigListBigList.add(long,Object)public boolean add(boolean key)
AbstractBooleanBigListThis implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of BigList.add(long, Object).
add in interface BooleanCollectionadd in class AbstractBooleanBigListCollection.add(Object)public boolean getBoolean(long index)
BooleanBigListgetBoolean in interface BooleanBigListBigList.get(long)public long indexOf(boolean k)
BooleanBigListindexOf in interface BooleanBigListindexOf in class AbstractBooleanBigListBigList.indexOf(Object)public long lastIndexOf(boolean k)
BooleanBigListlastIndexOf in interface BooleanBigListlastIndexOf in class AbstractBooleanBigListBigList.lastIndexOf(Object)public boolean removeBoolean(long index)
AbstractBooleanBigListThis implementation always throws an UnsupportedOperationException.
removeBoolean in interface BooleanBigListremoveBoolean in class AbstractBooleanBigListBigList.remove(long)public boolean set(long index,
boolean k)
AbstractBooleanBigListThis implementation always throws an UnsupportedOperationException.
set in interface BooleanBigListset in class AbstractBooleanBigListBigList.set(long,Object)public boolean isEmpty()
StackisEmpty in interface Stack<Boolean>isEmpty in interface Collection<Boolean>isEmpty in class AbstractCollection<Boolean>public <T> T[] toArray(T[] a)
toArray in interface Collection<Boolean>toArray in class AbstractCollection<Boolean>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Boolean>containsAll in class AbstractCollection<Boolean>public boolean addAll(Collection<? extends Boolean> c)
AbstractBooleanBigListThis implementation delegates to the type-specific version of BigList.addAll(long, Collection).
addAll in interface Collection<Boolean>addAll in class AbstractBooleanBigListpublic boolean removeAll(Collection<?> c)
removeAll in interface Collection<Boolean>removeAll in class AbstractCollection<Boolean>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Boolean>retainAll in class AbstractCollection<Boolean>public void clear()
AbstractBooleanBigListThis implementation delegates to AbstractBooleanBigList.removeElements(long, long).
clear in interface Collection<Boolean>clear in class AbstractBooleanBigListpublic int hashCode()
AbstractBooleanBigListList.hashCode().hashCode in interface Collection<Boolean>hashCode in class AbstractBooleanBigList