public static class BooleanLists.SynchronizedRandomAccessList extends BooleanLists.SynchronizedList implements java.util.RandomAccess, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected BooleanCollection |
collection |
protected java.lang.Object |
sync |
list| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedRandomAccessList(BooleanList l) |
protected |
SynchronizedRandomAccessList(BooleanList l,
java.lang.Object sync) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(boolean k)
Ensures that this collection contains the specified element (optional operation).
|
boolean |
add(java.lang.Boolean k)
Deprecated.
|
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) |
void |
clear() |
boolean |
contains(boolean k)
Returns
true if this collection contains the specified element. |
boolean |
contains(java.lang.Object k)
Deprecated.
|
boolean |
containsAll(BooleanCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
void |
forEach(it.unimi.dsi.fastutil.booleans.BooleanConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
boolean |
isEmpty() |
java.util.stream.Stream<java.lang.Boolean> |
parallelStream() |
boolean |
rem(boolean k)
Removes a single instance of the specified element from this
collection, if it is present (optional operation).
|
boolean |
remove(java.lang.Object k)
Deprecated.
|
boolean |
removeAll(BooleanCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(BooleanCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
it.unimi.dsi.fastutil.booleans.BooleanSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.util.stream.Stream<java.lang.Boolean> |
stream() |
BooleanList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
java.lang.Object[] |
toArray() |
boolean[] |
toArray(boolean[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
|
<T> T[] |
toArray(T[] a) |
boolean[] |
toBooleanArray()
Returns a primitive type array containing the items of this collection.
|
boolean[] |
toBooleanArray(boolean[] a)
Deprecated.
|
java.lang.String |
toString() |
add, add, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, equals, get, getBoolean, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeBoolean, removeElements, removeIf, replaceAll, set, set, setElements, setElements, setElements, size, sort, sort, unstableSort, unstableSortclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, contains, of, of, of, of, of, remove, replaceAll, spliteratoraddAll, clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArrayaddAll, contains, containsAll, rem, removeAll, removeIf, retainAll, toArray, toBooleanArray, toBooleanArrayforEach, forEachprotected final BooleanCollection collection
protected final java.lang.Object sync
protected SynchronizedRandomAccessList(BooleanList l, java.lang.Object sync)
protected SynchronizedRandomAccessList(BooleanList l)
public BooleanList subList(int from, int to)
BooleanListfrom, inclusive, to the index to, exclusive.subList in interface BooleanListsubList in interface java.util.List<java.lang.Boolean>subList in class BooleanLists.SynchronizedListList.subList(int,int)public boolean add(boolean k)
BooleanCollectionadd in interface BooleanCollectionCollection.add(Object)public boolean contains(boolean k)
BooleanCollectiontrue if this collection contains the specified element.contains in interface BooleanCollectionCollection.contains(Object)public boolean rem(boolean k)
BooleanCollectionNote that this method should be called remove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().
rem in interface BooleanCollectionCollection.remove(Object)public int size()
size in interface java.util.Collection<java.lang.Boolean>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Boolean>public boolean[] toBooleanArray()
BooleanCollectiontoBooleanArray in interface BooleanCollectionCollection.toArray()public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Boolean>@Deprecated public boolean[] toBooleanArray(boolean[] a)
BooleanCollectionNote 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 BooleanCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean[] toArray(boolean[] a)
BooleanCollectionNote 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 BooleanCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean addAll(BooleanCollection c)
BooleanCollectionaddAll in interface BooleanCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean containsAll(BooleanCollection c)
BooleanCollectioncontainsAll in interface BooleanCollectionc - 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 BooleanCollectionc - 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 BooleanCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)@Deprecated public boolean add(java.lang.Boolean k)
BooleanCollectionadd in interface BooleanCollectionadd in interface java.util.Collection<java.lang.Boolean>@Deprecated public boolean contains(java.lang.Object k)
BooleanCollectioncontains in interface BooleanCollectioncontains in interface java.util.Collection<java.lang.Boolean>@Deprecated public boolean remove(java.lang.Object k)
BooleanCollectionremove in interface BooleanCollectionremove in interface java.util.Collection<java.lang.Boolean>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Boolean>public it.unimi.dsi.fastutil.booleans.BooleanSpliterator spliterator()
BooleanCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
spliterator in interface BooleanCollectionspliterator in interface BooleanIterablespliterator in interface java.lang.Iterable<java.lang.Boolean>spliterator in interface java.util.Collection<java.lang.Boolean>public java.util.stream.Stream<java.lang.Boolean> stream()
stream in interface java.util.Collection<java.lang.Boolean>public java.util.stream.Stream<java.lang.Boolean> parallelStream()
parallelStream in interface java.util.Collection<java.lang.Boolean>public void forEach(it.unimi.dsi.fastutil.booleans.BooleanConsumer action)
BooleanIterableIterable
until all elements have been processed or the action throws an
exception.forEach in interface BooleanIterableaction - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean addAll(java.util.Collection<? extends java.lang.Boolean> c)
addAll in interface java.util.Collection<java.lang.Boolean>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Boolean>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Boolean>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Boolean>public void clear()
clear in interface java.util.Collection<java.lang.Boolean>public java.lang.String toString()
toString in class java.lang.Object