public static class BooleanBigLists.ListBigList extends AbstractBooleanBigList implements java.io.Serializable
AbstractBooleanBigList.BooleanRandomAccessSubList, 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(java.util.Collection<? extends java.lang.Boolean> c) |
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,
java.util.Collection<? extends java.lang.Boolean> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
void |
clear() |
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(java.util.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(java.util.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(java.util.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, forEach, get, getElements, indexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, rem, remove, set, setElements, size, top, topBoolean, toString
add, contains, remove, toArray
addAll, addAll, setElements, setElements, spliterator
add, contains, remove, removeIf, removeIf, toArray
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.Boolean>
size
in class AbstractBooleanBigList
size
- the new size.public BooleanBigListIterator iterator()
AbstractBooleanBigList
iterator
in interface BooleanBigList
iterator
in interface BooleanCollection
iterator
in interface BooleanIterable
iterator
in interface java.lang.Iterable<java.lang.Boolean>
iterator
in interface java.util.Collection<java.lang.Boolean>
iterator
in class AbstractBooleanBigList
Iterable.iterator()
public BooleanBigListIterator listIterator()
AbstractBooleanBigList
listIterator
in interface BigList<java.lang.Boolean>
listIterator
in interface BooleanBigList
listIterator
in class AbstractBooleanBigList
BigList.listIterator()
public BooleanBigListIterator listIterator(long index)
AbstractBooleanBigList
listIterator
in interface BigList<java.lang.Boolean>
listIterator
in interface BooleanBigList
listIterator
in class AbstractBooleanBigList
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.Boolean> c)
AbstractBooleanBigList
addAll
in interface BigList<java.lang.Boolean>
addAll
in class AbstractBooleanBigList
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 BooleanBigList subList(long from, long to)
BooleanBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Boolean>
subList
in interface BooleanBigList
subList
in class AbstractBooleanBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(boolean key)
AbstractBooleanBigList
contains
in interface BooleanCollection
contains
in class AbstractBooleanBigList
Collection.contains(Object)
public boolean[] toBooleanArray()
BooleanCollection
toBooleanArray
in interface BooleanCollection
toBooleanArray
in class AbstractBooleanCollection
Collection.toArray()
public void removeElements(long from, long to)
AbstractBooleanBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface BooleanBigList
removeElements
in class AbstractBooleanBigList
from
- the start index (inclusive).to
- the end index (exclusive).@Deprecated public boolean[] toBooleanArray(boolean[] a)
AbstractBooleanCollection
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.
toBooleanArray
in interface BooleanCollection
toBooleanArray
in class AbstractBooleanCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean addAll(long index, BooleanCollection c)
AbstractBooleanBigList
addAll
in interface BooleanBigList
addAll
in class AbstractBooleanBigList
List.addAll(int,java.util.Collection)
public boolean addAll(BooleanCollection c)
AbstractBooleanBigList
addAll
in interface BooleanCollection
addAll
in class AbstractBooleanBigList
c
- 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)
BooleanBigList
addAll
in interface BooleanBigList
BigList.addAll(long,Collection)
public boolean addAll(BooleanBigList c)
BooleanBigList
addAll
in interface BooleanBigList
Collection.addAll(Collection)
public boolean containsAll(BooleanCollection c)
BooleanCollection
containsAll
in interface BooleanCollection
containsAll
in class AbstractBooleanCollection
c
- a type-specific collection.true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean removeAll(BooleanCollection c)
BooleanCollection
removeAll
in interface BooleanCollection
removeAll
in class AbstractBooleanCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(BooleanCollection c)
BooleanCollection
retainAll
in interface BooleanCollection
retainAll
in class AbstractBooleanCollection
c
- 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)
AbstractBooleanBigList
add
in interface BooleanBigList
add
in class AbstractBooleanBigList
BigList.add(long,Object)
public boolean add(boolean key)
AbstractBooleanBigList
add
in interface BooleanCollection
add
in class AbstractBooleanBigList
Collection.add(Object)
public boolean getBoolean(long index)
BooleanBigList
getBoolean
in interface BooleanBigList
BigList.get(long)
public long indexOf(boolean k)
BooleanBigList
indexOf
in interface BooleanBigList
indexOf
in class AbstractBooleanBigList
BigList.indexOf(Object)
public long lastIndexOf(boolean k)
BooleanBigList
lastIndexOf
in interface BooleanBigList
lastIndexOf
in class AbstractBooleanBigList
BigList.lastIndexOf(Object)
public boolean removeBoolean(long index)
AbstractBooleanBigList
removeBoolean
in interface BooleanBigList
removeBoolean
in class AbstractBooleanBigList
BigList.remove(long)
public boolean set(long index, boolean k)
AbstractBooleanBigList
set
in interface BooleanBigList
set
in class AbstractBooleanBigList
BigList.set(long,Object)
public boolean isEmpty()
Stack
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Boolean>
toArray
in class java.util.AbstractCollection<java.lang.Boolean>
public boolean containsAll(java.util.Collection<?> c)
AbstractBooleanCollection
containsAll
in interface java.util.Collection<java.lang.Boolean>
containsAll
in class AbstractBooleanCollection
public boolean addAll(java.util.Collection<? extends java.lang.Boolean> c)
AbstractBooleanBigList
addAll
in interface java.util.Collection<java.lang.Boolean>
addAll
in class AbstractBooleanBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractBooleanCollection
removeAll
in interface java.util.Collection<java.lang.Boolean>
removeAll
in class AbstractBooleanCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractBooleanCollection
retainAll
in interface java.util.Collection<java.lang.Boolean>
retainAll
in class AbstractBooleanCollection
public void clear()
AbstractBooleanBigList
clear
in interface java.util.Collection<java.lang.Boolean>
clear
in class AbstractBooleanBigList
public int hashCode()
AbstractBooleanBigList
List.hashCode()
.hashCode
in interface java.util.Collection<java.lang.Boolean>
hashCode
in class AbstractBooleanBigList