Interface BooleanSet

All Superinterfaces:
it.unimi.dsi.fastutil.booleans.BooleanCollection, it.unimi.dsi.fastutil.booleans.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 it.unimi.dsi.fastutil.booleans.BooleanCollection, Set<Boolean>
A type-specific Set; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens (again) iterator().

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Deprecated.
    Please use the corresponding type-specific method instead.
    default boolean
    Deprecated.
    Please use the corresponding type-specific method instead.
    it.unimi.dsi.fastutil.booleans.BooleanIterator
    Returns a type-specific iterator on the elements of this set.
    static BooleanSet
    of()
    Returns an immutable empty set.
    static BooleanSet
    of(boolean e)
    Returns an immutable set with the element given.
    static BooleanSet
    of(boolean... a)
    Returns an immutable list with the elements given.
    static BooleanSet
    of(boolean e0, boolean e1)
    Returns an immutable set with the elements given.
    static BooleanSet
    of(boolean e0, boolean e1, boolean e2)
    Returns an immutable set with the elements given.
    default boolean
    rem(boolean k)
    Deprecated.
    Please use remove() instead.
    boolean
    remove(boolean k)
    Removes an element from this set.
    default boolean
    Deprecated.
    Please use the corresponding type-specific method instead.
    default it.unimi.dsi.fastutil.booleans.BooleanSpliterator
    Returns a type-specific spliterator on the elements of this set.

    Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection

    add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toBooleanArray, toBooleanArray

    Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanIterable

    forEach, forEach

    Methods inherited from interface java.util.Collection

    parallelStream, stream, toArray

    Methods inherited from interface java.util.Set

    addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArray
  • Method Details

    • iterator

      it.unimi.dsi.fastutil.booleans.BooleanIterator iterator()
      Returns a type-specific iterator on the elements of this set.
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.booleans.BooleanIterable
      Specified by:
      iterator in interface Collection<Boolean>
      Specified by:
      iterator in interface Iterable<Boolean>
      Specified by:
      iterator in interface Set<Boolean>
      Returns:
      a type-specific iterator on the elements of this set.
    • spliterator

      default it.unimi.dsi.fastutil.booleans.BooleanSpliterator spliterator()
      Returns a type-specific spliterator on the elements of this set.

      Set spliterators must report at least Spliterator.DISTINCT.

      See Set.spliterator() for more documentation on the requirements of the returned spliterator.

      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.booleans.BooleanIterable
      Specified by:
      spliterator in interface Collection<Boolean>
      Specified by:
      spliterator in interface Iterable<Boolean>
      Specified by:
      spliterator in interface Set<Boolean>
      Returns:
      Since:
      8.5.0
    • remove

      boolean remove(boolean k)
      Removes an element from this set.
      See Also:
    • remove

      @Deprecated default boolean remove(Object o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      remove in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      remove in interface Collection<Boolean>
      Specified by:
      remove in interface Set<Boolean>
    • add

      @Deprecated default boolean add(Boolean o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      add in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      add in interface Collection<Boolean>
      Specified by:
      add in interface Set<Boolean>
    • contains

      @Deprecated default boolean contains(Object o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      contains in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      contains in interface Collection<Boolean>
      Specified by:
      contains in interface Set<Boolean>
    • rem

      @Deprecated default boolean rem(boolean k)
      Deprecated.
      Please use remove() 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:
      rem in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
    • of

      static BooleanSet of()
      Returns an immutable empty set.
      Returns:
      an immutable empty set.
    • of

      static BooleanSet of(boolean e)
      Returns an immutable set with the element given.
      Parameters:
      e - an element.
      Returns:
      an immutable set containing e.
    • of

      static BooleanSet of(boolean e0, boolean e1)
      Returns an immutable set with the elements given.
      Parameters:
      e0 - the first element.
      e1 - the second element.
      Returns:
      an immutable set containing e0 and e1.
      Throws:
      IllegalArgumentException - if there were duplicate entries.
    • of

      static BooleanSet of(boolean e0, boolean e1, boolean e2)
      Returns an immutable set with the elements given.
      Parameters:
      e0 - the first element.
      e1 - the second element.
      e2 - the third element.
      Returns:
      an immutable set containing e0, e1, and e2.
      Throws:
      IllegalArgumentException - if there were duplicate entries.
    • of

      static BooleanSet of(boolean... a)
      Returns an immutable list with the elements given.
      Parameters:
      a - the list of elements that will be in the final set.
      Returns:
      an immutable set containing the elements in a.
      Throws:
      IllegalArgumentException - if there are any duplicate entries.