public class FloatOpenCustomHashSet extends AbstractFloatSet implements ITrimmable
| Constructor and Description |
|---|
FloatOpenCustomHashSet(java.util.Collection<? extends java.lang.Float> collection,
float loadFactor,
FloatStrategy strategy)
Deprecated.
|
FloatOpenCustomHashSet(java.util.Collection<? extends java.lang.Float> collection,
FloatStrategy strategy)
Deprecated.
|
FloatOpenCustomHashSet(float[] array,
float loadFactor,
FloatStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenCustomHashSet(float[] array,
FloatStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenCustomHashSet(float[] array,
int offset,
int length,
float loadFactor,
FloatStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenCustomHashSet(float[] array,
int offset,
int length,
FloatStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
FloatOpenCustomHashSet(FloatCollection collection,
float loadFactor,
FloatStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
FloatOpenCustomHashSet(FloatCollection collection,
FloatStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
FloatOpenCustomHashSet(FloatIterator iterator,
float loadFactor,
FloatStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenCustomHashSet(FloatIterator iterator,
FloatStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenCustomHashSet(FloatStrategy strategy)
Default Contstructor
|
FloatOpenCustomHashSet(int minCapacity,
float loadFactor,
FloatStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
FloatOpenCustomHashSet(int minCapacity,
FloatStrategy strategy)
Constructor that defines the minimum capacity
|
FloatOpenCustomHashSet(java.util.Iterator<java.lang.Float> iterator,
float loadFactor,
FloatStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
FloatOpenCustomHashSet(java.util.Iterator<java.lang.Float> iterator,
FloatStrategy strategy)
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.
|
FloatOpenCustomHashSet |
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
|
FloatStrategy |
getStrategy()
Helper getter function to get the current strategy
|
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
|
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, contains, containsAll, containsAll, containsAny, containsAny, remFloat, remove, removeAll, removeAll, retainAll, retainAll, toFloatArray, toFloatArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remFloat, remove, 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 FloatOpenCustomHashSet(FloatStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic FloatOpenCustomHashSet(int minCapacity,
FloatStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic FloatOpenCustomHashSet(int minCapacity,
float loadFactor,
FloatStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenCustomHashSet(float[] array,
FloatStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic FloatOpenCustomHashSet(float[] array,
float loadFactor,
FloatStrategy strategy)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenCustomHashSet(float[] array,
int offset,
int length,
FloatStrategy strategy)
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 arraystrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic FloatOpenCustomHashSet(float[] array,
int offset,
int length,
float loadFactor,
FloatStrategy strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 FloatOpenCustomHashSet(java.util.Collection<? extends java.lang.Float> collection,
FloatStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is null@Deprecated
public FloatOpenCustomHashSet(java.util.Collection<? extends java.lang.Float> collection,
float loadFactor,
FloatStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenCustomHashSet(FloatCollection collection, FloatStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic FloatOpenCustomHashSet(FloatCollection collection, float loadFactor, FloatStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenCustomHashSet(java.util.Iterator<java.lang.Float> iterator,
FloatStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic FloatOpenCustomHashSet(java.util.Iterator<java.lang.Float> iterator,
float loadFactor,
FloatStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatOpenCustomHashSet(FloatIterator iterator, FloatStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic FloatOpenCustomHashSet(FloatIterator iterator, float loadFactor, FloatStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public FloatStrategy getStrategy()
public 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(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 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 FloatOpenCustomHashSet 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>public 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 applied