BooleanCollection, BooleanIterable, java.io.Serializable, java.lang.Iterable<java.lang.Boolean>, java.util.Collection<java.lang.Boolean>BooleanBigLists.SynchronizedBigList, BooleanLists.SynchronizedList, BooleanSets.SynchronizedSetpublic static class BooleanCollections.SynchronizedCollection extends java.lang.Object implements BooleanCollection, java.io.Serializable
| Modifier and Type | Method | 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) |
|
boolean |
equals(java.lang.Object o) |
|
int |
hashCode() |
|
boolean |
isEmpty() |
|
BooleanIterator |
iterator() |
Returns a type-specific iterator on the elements of this collection.
|
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() |
|
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() |
forEach, forEachpublic 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)
BooleanCollection
Note 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)
BooleanCollection
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 BooleanCollectiona - if this array is big enough, it will be used to store this
collection.Collection.toArray(Object[])public boolean[] toArray(boolean[] a)
BooleanCollection
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.
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 BooleanIterator iterator()
BooleanCollection
Note 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.
iterator in interface BooleanCollectioniterator in interface BooleanIterableiterator in interface java.util.Collection<java.lang.Boolean>iterator in interface java.lang.Iterable<java.lang.Boolean>Iterable.iterator()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.Objectpublic 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