Package it.unimi.dsi.fastutil.booleans
Interface BooleanSet
-
- All Superinterfaces:
BooleanCollection,BooleanIterable,Collection<Boolean>,Iterable<Boolean>,Set<Boolean>
- All Known Implementing Classes:
AbstractBooleanSet,BooleanArraySet,BooleanOpenHashSet,BooleanSets.EmptySet,BooleanSets.Singleton,BooleanSets.SynchronizedSet,BooleanSets.UnmodifiableSet
public interface BooleanSet extends BooleanCollection, Set<Boolean>
A type-specificSet; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator().- See Also:
Set
-
-
Method Summary
Modifier and Type Method Description default booleanadd(Boolean o)Deprecated.Please use the corresponding type-specific method instead.default booleancontains(Object o)Deprecated.Please use the corresponding type-specific method instead.BooleanIteratoriterator()Returns a type-specific iterator on the elements of this set.default booleanrem(boolean k)Deprecated.Please useremove()instead.booleanremove(boolean k)Removes an element from this set.default booleanremove(Object o)Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
add, addAll, contains, containsAll, removeAll, retainAll, toArray, toBooleanArray, toBooleanArray
-
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanIterable
forEach, forEach
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
iterator
BooleanIterator iterator()
Returns a type-specific iterator on the elements of this set.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 extendsSet.- Specified by:
iteratorin interfaceBooleanCollection- Specified by:
iteratorin interfaceBooleanIterable- Specified by:
iteratorin interfaceCollection<Boolean>- Specified by:
iteratorin interfaceIterable<Boolean>- Specified by:
iteratorin interfaceSet<Boolean>- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(boolean k)
Removes an element from this set.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 theListinterface.- See Also:
Collection.remove(Object)
-
remove
@Deprecated default boolean remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceBooleanCollection- Specified by:
removein interfaceCollection<Boolean>- Specified by:
removein interfaceSet<Boolean>
-
add
@Deprecated default boolean add(Boolean o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceBooleanCollection- Specified by:
addin interfaceCollection<Boolean>- Specified by:
addin interfaceSet<Boolean>
-
contains
@Deprecated default boolean contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsin interfaceBooleanCollection- Specified by:
containsin interfaceCollection<Boolean>- Specified by:
containsin interfaceSet<Boolean>
-
rem
@Deprecated default boolean rem(boolean k)
Deprecated.Please useremove()instead.Removes an element from this set.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.- Specified by:
remin interfaceBooleanCollection- See Also:
Collection.remove(Object)
-
-