public static class AbstractBooleanBigList.BooleanSubList extends AbstractBooleanBigList implements java.io.Serializable
AbstractBooleanBigList.BooleanRandomAccessSubList, AbstractBooleanBigList.BooleanSubList
Constructor and Description |
---|
BooleanSubList(BooleanBigList l,
long from,
long to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(boolean k)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
boolean k)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(long index,
BooleanBigList l)
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 |
addElements(long index,
boolean[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
boolean |
getBoolean(long index)
Returns the element at the specified position.
|
void |
getElements(long from,
boolean[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
BooleanBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(boolean k)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
|
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 |
set(long index,
boolean k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
long |
size64()
Returns the size of this data structure as a long.
|
BooleanSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
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. |
add, addAll, addAll, addElements, clear, compareTo, contains, equals, forEach, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekBoolean, pop, popBoolean, push, push, remove, set, setElements, size, size, top, topBoolean, toString
add, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toBooleanArray, toBooleanArray
addAll, addAll, addAll, setElements, setElements
add, contains, containsAll, remove, removeAll, removeIf, removeIf, retainAll, toArray, toBooleanArray, toBooleanArray
containsAll, isEmpty, parallelStream, removeAll, retainAll, stream, toArray, toArray
forEach
public BooleanSubList(BooleanBigList l, long from, long to)
public boolean add(boolean k)
AbstractBooleanBigList
add
in interface BooleanCollection
add
in class AbstractBooleanBigList
Collection.add(Object)
public void add(long index, boolean k)
AbstractBooleanBigList
add
in interface BooleanBigList
add
in class AbstractBooleanBigList
BigList.add(long,Object)
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 boolean getBoolean(long index)
BooleanBigList
getBoolean
in interface BooleanBigList
BigList.get(long)
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 long size64()
Size64
public void getElements(long from, boolean[][] a, long offset, long length)
AbstractBooleanBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface BooleanBigList
getElements
in class AbstractBooleanBigList
from
- the start index (inclusive).a
- the destination big array.offset
- the offset into the destination big array where to store the first element copied.length
- the number of elements to be copied.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).public void addElements(long index, boolean[][] a, long offset, long length)
AbstractBooleanBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface BooleanBigList
addElements
in class AbstractBooleanBigList
index
- the index at which to add elements.a
- the big array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.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 BooleanSpliterator spliterator()
BooleanBigList
BigList spliterators must report at least Spliterator.SIZED
and Spliterator.ORDERED
.
See List.spliterator()
for more documentation on the requirements
of the returned spliterator (despite BigList
not being a List
, most of the
same requirements apply.
spliterator
in interface BooleanBigList
spliterator
in interface BooleanCollection
spliterator
in interface BooleanIterable
spliterator
in interface java.lang.Iterable<java.lang.Boolean>
spliterator
in interface java.util.Collection<java.lang.Boolean>
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 rem(boolean k)
AbstractBooleanBigList
rem
in interface BooleanCollection
rem
in class AbstractBooleanBigList
Collection.remove(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(long index, BooleanBigList l)
BooleanBigList
addAll
in interface BooleanBigList
BigList.addAll(long,Collection)