it.unimi.dsi.fastutil.booleans
Class AbstractBooleanSet

java.lang.Object
  extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
      extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanSet
All Implemented Interfaces:
BooleanCollection, BooleanIterable, BooleanSet, Cloneable, Iterable<Boolean>, Collection<Boolean>, Set<Boolean>
Direct Known Subclasses:
BooleanArraySet, BooleanOpenHashSet, BooleanSets.Singleton

public abstract class AbstractBooleanSet
extends AbstractBooleanCollection
implements Cloneable, BooleanSet

An abstract class providing basic methods for sets implementing a type-specific interface.


Method Summary
 boolean equals(Object o)
           
 int hashCode()
          Returns a hash code for this set.
abstract  BooleanIterator iterator()
          Returns a type-specific iterator on the elements of this collection.
 boolean rem(boolean k)
          Delegates to remove().
 boolean remove(boolean k)
          Removes an element from this set.
 boolean remove(Object o)
          Delegates to the corresponding type-specific method.
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
add, add, addAll, addAll, booleanIterator, clear, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toBooleanArray, toBooleanArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
add, addAll, booleanIterator, contains, containsAll, removeAll, retainAll, toArray, toArray, toBooleanArray, toBooleanArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArray
 

Method Detail

iterator

public abstract BooleanIterator iterator()
Description copied from interface: BooleanCollection
Returns a type-specific iterator on the elements of this collection.

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.

Specified by:
iterator in interface BooleanCollection
Specified by:
iterator in interface BooleanIterable
Specified by:
iterator in interface BooleanSet
Specified by:
iterator in interface Iterable<Boolean>
Specified by:
iterator in interface Collection<Boolean>
Specified by:
iterator in interface Set<Boolean>
Specified by:
iterator in class AbstractBooleanCollection
Returns:
a type-specific iterator on the elements of this collection.

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<Boolean>
Specified by:
equals in interface Set<Boolean>
Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code for this set. The hash code of a set is computed by summing the hash codes of its elements.

Specified by:
hashCode in interface Collection<Boolean>
Specified by:
hashCode in interface Set<Boolean>
Overrides:
hashCode in class Object
Returns:
a hash code for this set.

remove

public boolean remove(boolean k)
Description copied from interface: BooleanSet
Removes an element from this set.

Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

Specified by:
remove in interface BooleanSet
See Also:
Collection.remove(Object)

rem

public boolean rem(boolean k)
Delegates to remove().

Specified by:
rem in interface BooleanCollection
Overrides:
rem in class AbstractBooleanCollection
Parameters:
k - the element to be removed.
Returns:
true if the set was modified.
See Also:
Collection.remove(Object)

remove

public boolean remove(Object o)
Delegates to the corresponding type-specific method.

Specified by:
remove in interface Collection<Boolean>
Specified by:
remove in interface Set<Boolean>
Overrides:
remove in class AbstractBooleanCollection