public class FloatOpenHashSet extends AbstractFloatSet implements ITrimmable
| Constructor and Description |
|---|
FloatOpenHashSet()
Default Constructor
|
FloatOpenHashSet(java.util.Collection<? extends java.lang.Float> collection)
Deprecated.
|
FloatOpenHashSet(java.util.Collection<? extends java.lang.Float> collection,
float loadFactor)
Deprecated.
|
FloatOpenHashSet(float[] array)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenHashSet(float[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenHashSet(float[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenHashSet(float[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenHashSet(FloatCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
FloatOpenHashSet(FloatCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
FloatOpenHashSet(FloatIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenHashSet(FloatIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
FloatOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
FloatOpenHashSet(java.util.Iterator<java.lang.Float> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenHashSet(java.util.Iterator<java.lang.Float> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Float> c)
Deprecated.
|
boolean |
addAll(FloatCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(float o)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
FloatOpenHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Float2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
float |
findFirst(Float2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectFloatConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(FloatConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
FloatIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(Float2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Float2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Float2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
float |
reduce(float identity,
FloatFloatUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
float |
reduce(FloatFloatUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(float o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
int |
size() |
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
equals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remFloat, removeAll, removeAll, retainAll, retainAll, toFloatArray, toFloatArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, remFloat, spliterator, synchronize, synchronize, unmodifiablecontainsAll, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toFloatArray, toFloatArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedpublic FloatOpenHashSet()
public FloatOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic FloatOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenHashSet(float[] array)
array - the elements that should be put into the setpublic FloatOpenHashSet(float[] array,
float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenHashSet(float[] array,
int offset,
int length)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic FloatOpenHashSet(float[] array,
int offset,
int length,
float loadFactor)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if offset and length causes to step outside of the arrays range@Deprecated public FloatOpenHashSet(java.util.Collection<? extends java.lang.Float> collection)
collection - the set the elements should be added to the Set@Deprecated
public FloatOpenHashSet(java.util.Collection<? extends java.lang.Float> collection,
float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenHashSet(FloatCollection collection)
collection - the set the elements should be added to the Setpublic FloatOpenHashSet(FloatCollection collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenHashSet(java.util.Iterator<java.lang.Float> iterator)
iterator - the elements that should be added to the setpublic FloatOpenHashSet(java.util.Iterator<java.lang.Float> iterator,
float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenHashSet(FloatIterator iterator)
iterator - the elements that should be added to the setpublic FloatOpenHashSet(FloatIterator iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean add(float o)
FloatCollectionadd in interface FloatCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Float> c)
AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Float>addAll in interface java.util.Set<java.lang.Float>addAll in class AbstractFloatCollectionpublic boolean addAll(FloatCollection c)
FloatCollectionaddAll in interface FloatCollectionaddAll in class AbstractFloatCollectionc - the collection of elements that should be addedpublic boolean contains(java.lang.Object o)
AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Float>contains in interface java.util.Set<java.lang.Float>contains in interface FloatCollectioncontains in interface FloatSetcontains in class AbstractFloatCollectionpublic boolean remove(java.lang.Object o)
AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Float>remove in interface java.util.Set<java.lang.Float>remove in interface FloatCollectionremove in interface FloatSetremove in class AbstractFloatCollectionpublic boolean contains(float o)
AbstractFloatCollectioncontains in interface FloatCollectioncontains in class AbstractFloatCollectiono - the element that should be searched for.public boolean remove(float o)
FloatSetpublic boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic void forEach(FloatConsumer action)
FloatIterableforEach in interface FloatIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectFloatConsumer<E> action)
FloatIterableforEach in interface FloatIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Float2BooleanFunction filter)
FloatIterablematchesAny in interface FloatIterablefilter - that should be appliedpublic boolean matchesNone(Float2BooleanFunction filter)
FloatIterablematchesNone in interface FloatIterablefilter - that should be appliedpublic boolean matchesAll(Float2BooleanFunction filter)
FloatIterablematchesAll in interface FloatIterablefilter - that should be appliedpublic float reduce(float identity,
FloatFloatUnaryOperator operator)
FloatIterablereduce in interface FloatIterableidentity - the start valueoperator - the operation that should be appliedpublic float reduce(FloatFloatUnaryOperator operator)
FloatIterablereduce in interface FloatIterableoperator - the operation that should be appliedpublic float findFirst(Float2BooleanFunction filter)
FloatIterablefindFirst in interface FloatIterablefilter - that should be appliedpublic int count(Float2BooleanFunction filter)
FloatIterablecount in interface FloatIterablefilter - that should be appliedpublic FloatIterator iterator()
FloatCollectioniterator 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 interface FloatCollectioniterator in interface FloatIterableiterator in interface FloatSetiterator in class AbstractFloatSetCollection.iterator()public FloatOpenHashSet copy()
FloatCollectioncopy in interface FloatCollectioncopy in interface FloatSetcopy in class AbstractFloatSetpublic void clear()
clear in interface java.util.Collection<java.lang.Float>clear in interface java.util.Set<java.lang.Float>clear in class java.util.AbstractCollection<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>