Package it.unimi.dsi.fastutil.floats
Interface FloatSet
-
- All Superinterfaces:
Collection<Float>,FloatCollection,FloatIterable,Iterable<Float>,Set<Float>
- All Known Subinterfaces:
FloatSortedSet
- All Known Implementing Classes:
AbstractFloatSet,AbstractFloatSortedSet,FloatArraySet,FloatAVLTreeSet,FloatLinkedOpenCustomHashSet,FloatLinkedOpenHashSet,FloatOpenCustomHashSet,FloatOpenHashBigSet,FloatOpenHashSet,FloatRBTreeSet,FloatSets.EmptySet,FloatSets.Singleton,FloatSets.SynchronizedSet,FloatSets.UnmodifiableSet,FloatSortedSets.EmptySet,FloatSortedSets.Singleton,FloatSortedSets.SynchronizedSortedSet,FloatSortedSets.UnmodifiableSortedSet
public interface FloatSet extends FloatCollection, Set<Float>
A type-specificSet; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator().- See Also:
Set
-
-
Method Summary
Modifier and Type Method Description default booleanadd(Float o)Deprecated.Please use the corresponding type-specific method instead.default booleancontains(Object o)Deprecated.Please use the corresponding type-specific method instead.FloatIteratoriterator()Returns a type-specific iterator on the elements of this set.default booleanrem(float k)Deprecated.Please useremove()instead.booleanremove(float k)Removes an element from this set.default booleanremove(Object o)Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toFloatArray, toFloatArray
-
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatIterable
forEach, forEach
-
-
-
-
Method Detail
-
iterator
FloatIterator iterator()
Returns a type-specific iterator on the elements of this set.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 extendsSet.- Specified by:
iteratorin interfaceCollection<Float>- Specified by:
iteratorin interfaceFloatCollection- Specified by:
iteratorin interfaceFloatIterable- Specified by:
iteratorin interfaceIterable<Float>- Specified by:
iteratorin interfaceSet<Float>- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(float k)
Removes an element from this set.Note that the corresponding method of a type-specific collection is
rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in theListinterface.- See Also:
Collection.remove(Object)
-
remove
@Deprecated default boolean remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceCollection<Float>- Specified by:
removein interfaceFloatCollection- Specified by:
removein interfaceSet<Float>
-
add
@Deprecated default boolean add(Float o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceCollection<Float>- Specified by:
addin interfaceFloatCollection- Specified by:
addin interfaceSet<Float>
-
contains
@Deprecated default boolean contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsin interfaceCollection<Float>- Specified by:
containsin interfaceFloatCollection- Specified by:
containsin interfaceSet<Float>
-
rem
@Deprecated default boolean rem(float k)
Deprecated.Please useremove()instead.Removes an element from this set.This method is inherited from the type-specific collection this type-specific set is based on, but it should not used as this interface reinstates
remove()as removal method.- Specified by:
remin interfaceFloatCollection- See Also:
Collection.remove(Object)
-
-