it.unimi.dsi.fastutil.floats
Class AbstractFloatSet

java.lang.Object
  extended by java.util.AbstractCollection<java.lang.Float>
      extended by it.unimi.dsi.fastutil.floats.AbstractFloatCollection
          extended by it.unimi.dsi.fastutil.floats.AbstractFloatSet
All Implemented Interfaces:
FloatCollection, FloatIterable, FloatSet, java.lang.Cloneable, java.lang.Iterable<java.lang.Float>, java.util.Collection<java.lang.Float>, java.util.Set<java.lang.Float>
Direct Known Subclasses:
AbstractFloatSortedSet, FloatArraySet, FloatOpenCustomHashSet, FloatOpenHashBigSet, FloatOpenHashSet, FloatSets.Singleton

public abstract class AbstractFloatSet
extends AbstractFloatCollection
implements java.lang.Cloneable, FloatSet

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


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

Method Detail

iterator

public abstract FloatIterator iterator()
Description copied from interface: FloatCollection
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 FloatCollection
Specified by:
iterator in interface FloatIterable
Specified by:
iterator in interface FloatSet
Specified by:
iterator in interface java.lang.Iterable<java.lang.Float>
Specified by:
iterator in interface java.util.Collection<java.lang.Float>
Specified by:
iterator in interface java.util.Set<java.lang.Float>
Specified by:
iterator in class AbstractFloatCollection
Returns:
a type-specific iterator on the elements of this collection.

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection<java.lang.Float>
Specified by:
equals in interface java.util.Set<java.lang.Float>
Overrides:
equals in class java.lang.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 java.util.Collection<java.lang.Float>
Specified by:
hashCode in interface java.util.Set<java.lang.Float>
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this set.

remove

public boolean remove(float k)
Description copied from interface: FloatSet
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 FloatSet
See Also:
Collection.remove(Object)

rem

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

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

remove

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

Specified by:
remove in interface java.util.Collection<java.lang.Float>
Specified by:
remove in interface java.util.Set<java.lang.Float>
Overrides:
remove in class AbstractFloatCollection