Class BooleanSets.Singleton

java.lang.Object
java.util.AbstractCollection<Boolean>
it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
it.unimi.dsi.fastutil.booleans.AbstractBooleanSet
it.unimi.dsi.fastutil.booleans.BooleanSets.Singleton
All Implemented Interfaces:
it.unimi.dsi.fastutil.booleans.BooleanCollection, it.unimi.dsi.fastutil.booleans.BooleanIterable, BooleanSet, Serializable, Cloneable, Iterable<Boolean>, Collection<Boolean>, Set<Boolean>
Enclosing class:
BooleanSets

public static class BooleanSets.Singleton extends AbstractBooleanSet implements Serializable, Cloneable
An immutable class representing a type-specific singleton set.

This class may be useful to implement your own in case you subclass a type-specific set.

See Also:
  • Field Details

    • element

      protected final boolean element
  • Constructor Details

    • Singleton

      protected Singleton(boolean element)
  • Method Details

    • contains

      public boolean contains(boolean k)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Overrides:
      contains in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • remove

      public boolean remove(boolean k)
      Description copied from class: AbstractBooleanSet
      Removes an element from this set. Delegates to the type-specific rem() method implemented by type-specific abstract Collection superclass.
      Specified by:
      remove in interface BooleanSet
      Overrides:
      remove in class AbstractBooleanSet
      See Also:
    • iterator

      public it.unimi.dsi.fastutil.booleans.BooleanListIterator iterator()
      Description copied from interface: BooleanSet
      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 BooleanSet
      Specified by:
      iterator in interface Collection<Boolean>
      Specified by:
      iterator in interface Iterable<Boolean>
      Specified by:
      iterator in interface Set<Boolean>
      Specified by:
      iterator in class AbstractBooleanSet
      Returns:
      a type-specific iterator on the elements of this set.
    • spliterator

      public it.unimi.dsi.fastutil.booleans.BooleanSpliterator spliterator()
      Description copied from interface: BooleanSet
      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 BooleanSet
      Specified by:
      spliterator in interface Collection<Boolean>
      Specified by:
      spliterator in interface Iterable<Boolean>
      Specified by:
      spliterator in interface Set<Boolean>
      Returns:
    • size

      public int size()
      Specified by:
      size in interface Collection<Boolean>
      Specified by:
      size in interface Set<Boolean>
      Specified by:
      size in class AbstractCollection<Boolean>
    • toBooleanArray

      public boolean[] toBooleanArray()
      Specified by:
      toBooleanArray in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Overrides:
      toBooleanArray in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • forEach

      @Deprecated public void forEach(Consumer<? super Boolean> action)
      Deprecated.
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.booleans.BooleanIterable
      Specified by:
      forEach in interface Iterable<Boolean>
    • addAll

      public boolean addAll(Collection<? extends Boolean> c)
      Specified by:
      addAll in interface Collection<Boolean>
      Specified by:
      addAll in interface Set<Boolean>
      Overrides:
      addAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • removeAll

      public boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<Boolean>
      Specified by:
      removeAll in interface Set<Boolean>
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • retainAll

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Boolean>
      Specified by:
      retainAll in interface Set<Boolean>
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • removeIf

      @Deprecated public boolean removeIf(Predicate<? super Boolean> filter)
      Deprecated.
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Specified by:
      removeIf in interface Collection<Boolean>
    • forEach

      public void forEach(it.unimi.dsi.fastutil.booleans.BooleanConsumer action)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.booleans.BooleanIterable
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c)
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Overrides:
      addAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
    • removeIf

      public boolean removeIf(it.unimi.dsi.fastutil.booleans.BooleanPredicate filter)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.booleans.BooleanCollection
    • toArray

      @Deprecated public Object[] toArray()
      Deprecated.
      Specified by:
      toArray in interface Collection<Boolean>
      Specified by:
      toArray in interface Set<Boolean>
      Overrides:
      toArray in class AbstractCollection<Boolean>
    • clone

      public Object clone()
      Overrides:
      clone in class Object