public static class FloatSets.Singleton extends AbstractFloatSet implements java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific set.
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.Float> c) |
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this collection.
|
java.lang.Object |
clone() |
boolean |
contains(float k)
Returns
true if this collection contains the specified element. |
DoubleIterator |
doubleIterator()
Returns a widened primitive iterator on the elements of this collection.
|
DoubleSpliterator |
doubleSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
void |
forEach(java.util.function.Consumer<? super java.lang.Float> action)
Deprecated.
|
void |
forEach(FloatConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
FloatListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
remove(float k)
Removes an element from this set.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(FloatCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeIf(FloatPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(FloatCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
FloatSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
java.lang.Object[] |
toArray()
Deprecated.
|
float[] |
toFloatArray()
Returns a primitive type array containing the items of this collection.
|
equals, hashCode, rem
add, add, contains, containsAll, containsAll, remove, toArray, toFloatArray, toString
add, contains, of, of, of, of, of, remove
add, containsAll, doubleParallelStream, doubleStream, parallelStream, removeIf, stream, toArray, toFloatArray
forEach
public boolean contains(float k)
AbstractFloatCollection
true
if this collection contains the specified element.contains
in interface FloatCollection
contains
in class AbstractFloatCollection
Collection.contains(Object)
public boolean remove(float k)
AbstractFloatSet
rem()
method
implemented by type-specific abstract Collection
superclass.remove
in interface FloatSet
remove
in class AbstractFloatSet
Collection.remove(Object)
public FloatListIterator iterator()
FloatCollection
iterator
in interface FloatCollection
iterator
in interface FloatIterable
iterator
in interface FloatSet
iterator
in interface java.lang.Iterable<java.lang.Float>
iterator
in interface java.util.Collection<java.lang.Float>
iterator
in interface java.util.Set<java.lang.Float>
iterator
in class AbstractFloatSet
Iterable.iterator()
public FloatSpliterator spliterator()
FloatSet
Set spliterators must report at least Spliterator.DISTINCT
.
See Set.spliterator()
for more documentation on the requirements
of the returned spliterator.
spliterator
in interface FloatCollection
spliterator
in interface FloatIterable
spliterator
in interface FloatSet
spliterator
in interface java.lang.Iterable<java.lang.Float>
spliterator
in interface java.util.Collection<java.lang.Float>
spliterator
in interface java.util.Set<java.lang.Float>
public int size()
size
in interface java.util.Collection<java.lang.Float>
size
in interface java.util.Set<java.lang.Float>
size
in class java.util.AbstractCollection<java.lang.Float>
public float[] toFloatArray()
FloatCollection
toFloatArray
in interface FloatCollection
toFloatArray
in class AbstractFloatCollection
Collection.toArray()
@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Float> action)
FloatIterable
forEach
in interface FloatIterable
forEach
in interface java.lang.Iterable<java.lang.Float>
public boolean addAll(java.util.Collection<? extends java.lang.Float> c)
AbstractFloatCollection
addAll
in interface java.util.Collection<java.lang.Float>
addAll
in interface java.util.Set<java.lang.Float>
addAll
in class AbstractFloatCollection
public boolean removeAll(java.util.Collection<?> c)
AbstractFloatCollection
removeAll
in interface java.util.Collection<java.lang.Float>
removeAll
in interface java.util.Set<java.lang.Float>
removeAll
in class AbstractFloatCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractFloatCollection
retainAll
in interface java.util.Collection<java.lang.Float>
retainAll
in interface java.util.Set<java.lang.Float>
retainAll
in class AbstractFloatCollection
@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
FloatCollection
removeIf
in interface FloatCollection
removeIf
in interface java.util.Collection<java.lang.Float>
public void forEach(FloatConsumer action)
FloatIterable
Iterable
until all elements have been processed or the action throws an
exception.forEach
in interface FloatIterable
action
- the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)
public boolean addAll(FloatCollection c)
FloatCollection
addAll
in interface FloatCollection
addAll
in class AbstractFloatCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean removeAll(FloatCollection c)
FloatCollection
removeAll
in interface FloatCollection
removeAll
in class AbstractFloatCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(FloatCollection c)
FloatCollection
retainAll
in interface FloatCollection
retainAll
in class AbstractFloatCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public boolean removeIf(FloatPredicate filter)
FloatCollection
removeIf
in interface FloatCollection
filter
- a predicate which returns true
for elements to be
removed.true
if any elements were removed.Collection.removeIf(java.util.function.Predicate)
public DoubleIterator doubleIterator()
FloatCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive iterators, of which there are only int
, long
, and double
.
doubleIterator
in interface FloatCollection
doubleIterator
in interface FloatIterable
public DoubleSpliterator doubleSpliterator()
FloatCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int
, long
, and double
.
doubleSpliterator
in interface FloatCollection
doubleSpliterator
in interface FloatIterable
@Deprecated public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Float>
toArray
in interface java.util.Set<java.lang.Float>
toArray
in class java.util.AbstractCollection<java.lang.Float>
public java.lang.Object clone()
clone
in class java.lang.Object