public abstract static class BooleanCollections.EmptyCollection extends AbstractBooleanCollection
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyCollection() |
| Modifier and Type | Method and Description |
|---|---|
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 |
containsAll(BooleanCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
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. |
void |
forEach(java.util.function.Consumer<? super java.lang.Boolean> action)
Deprecated.
|
int |
hashCode() |
BooleanBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(BooleanCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(BooleanPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Boolean> filter)
Deprecated.
|
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.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
boolean[] |
toBooleanArray()
Returns a primitive type array containing the items of this collection.
|
boolean[] |
toBooleanArray(boolean[] a)
Deprecated.
|
add, add, contains, rem, remove, toArray, toStringpublic boolean contains(boolean k)
AbstractBooleanCollectiontrue if this collection contains the specified element.contains in interface BooleanCollectioncontains in class AbstractBooleanCollectionCollection.contains(Object)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Boolean>toArray in class java.util.AbstractCollection<java.lang.Boolean>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<java.lang.Boolean>toArray in class java.util.AbstractCollection<java.lang.Boolean>public BooleanBidirectionalIterator iterator()
BooleanCollectioniterator in interface BooleanCollectioniterator in interface BooleanIterableiterator in interface java.lang.Iterable<java.lang.Boolean>iterator in interface java.util.Collection<java.lang.Boolean>iterator in class AbstractBooleanCollectionIterable.iterator()public it.unimi.dsi.fastutil.booleans.BooleanSpliterator spliterator()
BooleanCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Boolean>size in class java.util.AbstractCollection<java.lang.Boolean>public void clear()
clear in interface java.util.Collection<java.lang.Boolean>clear in class java.util.AbstractCollection<java.lang.Boolean>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Boolean>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Boolean>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Boolean> action)
BooleanIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractBooleanCollectioncontainsAll in interface java.util.Collection<java.lang.Boolean>containsAll in class AbstractBooleanCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Boolean> c)
AbstractBooleanCollectionaddAll in interface java.util.Collection<java.lang.Boolean>addAll in class AbstractBooleanCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractBooleanCollectionremoveAll in interface java.util.Collection<java.lang.Boolean>removeAll in class AbstractBooleanCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractBooleanCollectionretainAll in interface java.util.Collection<java.lang.Boolean>retainAll in class AbstractBooleanCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Boolean> filter)
BooleanCollectionpublic boolean[] toBooleanArray()
BooleanCollectiontoBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectionCollection.toArray()@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 void forEach(it.unimi.dsi.fastutil.booleans.BooleanConsumer action)
BooleanIterableIterable
until all elements have been processed or the action throws an
exception.action - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)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 addAll(BooleanCollection c)
BooleanCollectionaddAll in interface BooleanCollectionaddAll in class AbstractBooleanCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(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 boolean removeIf(BooleanPredicate filter)
BooleanCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)