public interface BooleanSet extends BooleanCollection, Set<Boolean>
Set; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
Set| Modifier and Type | Method and Description |
|---|---|
default boolean |
add(Boolean o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
contains(Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
BooleanIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
default boolean |
rem(boolean k)
Deprecated.
Please use
remove() instead. |
boolean |
remove(boolean k)
Removes an element from this set.
|
default boolean |
remove(Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
add, addAll, contains, containsAll, removeAll, retainAll, toArray, toBooleanArray, toBooleanArrayforEach, forEachaddAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamBooleanIterator iterator()
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 Set.
iterator in interface BooleanCollectioniterator in interface BooleanIterableiterator in interface Collection<Boolean>iterator in interface Iterable<Boolean>iterator in interface Set<Boolean>Iterable.iterator()boolean remove(boolean k)
Note that the corresponding method of a type-specific collection is rem().
This unfortunate situation is caused by the clash
with the similarly named index-based method in the List interface.
Collection.remove(Object)@Deprecated default boolean remove(Object o)
remove in interface BooleanCollectionremove in interface Collection<Boolean>remove in interface Set<Boolean>@Deprecated default boolean add(Boolean o)
add in interface BooleanCollectionadd in interface Collection<Boolean>add in interface Set<Boolean>@Deprecated default boolean contains(Object o)
contains in interface BooleanCollectioncontains in interface Collection<Boolean>contains in interface Set<Boolean>@Deprecated default boolean rem(boolean k)
remove() instead.This method is inherited from the type-specific collection this
type-specific set is based on, but it should not used as
this interface reinstates remove() as removal method.
rem in interface BooleanCollectionCollection.remove(Object)Copyright © 2020. All rights reserved.