it.unimi.dsi.fastutil.floats
Class AbstractFloatSet

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

public abstract class AbstractFloatSet
extends AbstractFloatCollection
implements Cloneable, FloatSet

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


Constructor Summary
protected AbstractFloatSet()
           
 
Method Summary
 boolean equals(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(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
clone, finalize, 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
 

Constructor Detail

AbstractFloatSet

protected AbstractFloatSet()
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 Iterable<Float>
Specified by:
iterator in interface Collection<Float>
Specified by:
iterator in interface Set<Float>
Specified by:
iterator in class AbstractFloatCollection
Returns:
a type-specific iterator on the elements of this collection.

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<Float>
Specified by:
equals in interface Set<Float>
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<Float>
Specified by:
hashCode in interface Set<Float>
Overrides:
hashCode in class 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(Object o)
Delegates to the corresponding type-specific method.

Specified by:
remove in interface Collection<Float>
Specified by:
remove in interface Set<Float>
Overrides:
remove in class AbstractFloatCollection


Copyright © 2011. All Rights Reserved.