Class AbstractFloatSet
java.lang.Object
java.util.AbstractCollection<Float>
it.unimi.dsi.fastutil.floats.AbstractFloatCollection
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.
Note that the type-specific Set interface adds a type-specific remove() method,
as it is no longer harmful for subclasses. Thus, concrete subclasses of this class must implement
remove() (the rem() implementation of this class just delegates to
remove()).
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns a hash code for this set.abstract FloatIteratoriterator()Returns a type-specific iterator on the elements of this collection.booleanrem(float k) Deprecated.booleanremove(float k) Removes an element from this set.Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toFloatArray, toFloatArray, toStringMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
add, addAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toFloatArray, toFloatArrayMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatSet
add, contains, remove, spliterator
-
Method Details
-
iterator
Description copied from interface:FloatCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<Float>- Specified by:
iteratorin interfaceFloatCollection- Specified by:
iteratorin interfaceFloatIterable- Specified by:
iteratorin interfaceFloatSet- Specified by:
iteratorin interfaceIterable<Float>- Specified by:
iteratorin interfaceSet<Float>- Specified by:
iteratorin classAbstractFloatCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
equals
-
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. -
remove
public boolean remove(float k) Removes an element from this set. Delegates to the type-specificrem()method implemented by type-specific abstractCollectionsuperclass. -
rem
Deprecated.Please useremove()instead.Removes a single instance of the specified element from this collection, if it is present (optional operation).Note that this method should be called
remove(), but the clash with the similarly named index-based method in theListinterface forces us to use a distinguished name. For simplicity, the set interfaces reinstatesremove(). Delegates to the type-specificremove()method specified in the type-specificSetinterface.- Specified by:
remin interfaceFloatCollection- Specified by:
remin interfaceFloatSet- Overrides:
remin classAbstractFloatCollection- See Also:
-
remove()instead.