Package it.unimi.dsi.fastutil.floats
Interface FloatSet
-
- All Superinterfaces:
java.util.Collection<java.lang.Float>
,FloatCollection
,FloatIterable
,java.lang.Iterable<java.lang.Float>
,java.util.Set<java.lang.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, java.util.Set<java.lang.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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default boolean
add(java.lang.Float o)
Deprecated.Please use the corresponding type-specific method instead.default boolean
contains(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.FloatIterator
iterator()
Returns a type-specific iterator on the elements of this set.static FloatSet
of(float... a)
Creates a new set using a list of elements.default boolean
rem(float k)
Deprecated.Please useremove()
instead.boolean
remove(float k)
Removes an element from this set.default boolean
remove(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.-
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:
iterator
in interfacejava.util.Collection<java.lang.Float>
- Specified by:
iterator
in interfaceFloatCollection
- Specified by:
iterator
in interfaceFloatIterable
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Float>
- Specified by:
iterator
in interfacejava.util.Set<java.lang.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 theList
interface.- See Also:
Collection.remove(Object)
-
remove
@Deprecated default boolean remove(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
remove
in interfacejava.util.Collection<java.lang.Float>
- Specified by:
remove
in interfaceFloatCollection
- Specified by:
remove
in interfacejava.util.Set<java.lang.Float>
-
add
@Deprecated default boolean add(java.lang.Float o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
add
in interfacejava.util.Collection<java.lang.Float>
- Specified by:
add
in interfaceFloatCollection
- Specified by:
add
in interfacejava.util.Set<java.lang.Float>
-
contains
@Deprecated default boolean contains(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
contains
in interfacejava.util.Collection<java.lang.Float>
- Specified by:
contains
in interfaceFloatCollection
- Specified by:
contains
in interfacejava.util.Set<java.lang.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:
rem
in interfaceFloatCollection
- See Also:
Collection.remove(Object)
-
of
@SafeVarargs static FloatSet of(float... a)
Creates a new set using a list of elements.- Parameters:
a
- a list of elements that will be used to initialize the new set.
-
-