Modul speiger.src.collections
Klasse FloatOpenCustomHashSet
java.lang.Object
java.util.AbstractCollection<Float>
speiger.src.collections.floats.collections.AbstractFloatCollection
speiger.src.collections.floats.sets.AbstractFloatSet
speiger.src.collections.floats.sets.FloatOpenCustomHashSet
- Alle implementierten Schnittstellen:
Iterable<Float>,Collection<Float>,Set<Float>,FloatCollection,FloatIterable,FloatSet,ISizeProvider,ITrimmable
- Bekannte direkte Unterklassen:
FloatLinkedOpenCustomHashSet
A Type Specific HashSet that allows for custom HashControl.
For cases where Objects/primitive do not allow hashcoding this can be really useful and provide a lot of control.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFloatOpenCustomHashSet(float[] array, float loadFactor, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatOpenCustomHashSet(float[] array, int offset, int length, float loadFactor, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatOpenCustomHashSet(float[] array, int offset, int length, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatOpenCustomHashSet(float[] array, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatOpenCustomHashSet(int minCapacity, float loadFactor, FloatStrategy strategy) Constructor that defines the minimum capacity and load factorFloatOpenCustomHashSet(int minCapacity, FloatStrategy strategy) Constructor that defines the minimum capacityFloatOpenCustomHashSet(Collection<? extends Float> collection, float loadFactor, FloatStrategy strategy) Veraltet.FloatOpenCustomHashSet(Collection<? extends Float> collection, FloatStrategy strategy) Veraltet.FloatOpenCustomHashSet(Iterator<Float> iterator, float loadFactor, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatOpenCustomHashSet(Iterator<Float> iterator, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatOpenCustomHashSet(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 sizeFloatOpenCustomHashSet(FloatIterator iterator, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatOpenCustomHashSet(FloatStrategy strategy) Default Contstructor -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(float o) A Type-Specific add function to reduce (un)boxingbooleanaddAll(Collection<? extends Float> c) Veraltet.booleanA Type-Specific addAll function to reduce (un)boxingvoidclear()voidclearAndTrim(int size) Trims the collection down to the requested size and clears all elements while doing sobooleancontains(float o) A Type-Specific implementation of contains.copy()A Function that does a shallow clone of the Collection itself.intcount(FloatPredicate filter) Helper function to reduce stream usage that allows to count the valid elements.floatfindFirst(FloatPredicate filter) Helper function to reduce stream usage that allows to filter for the first match.<E> voidforEach(E input, ObjectFloatConsumer<E> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidforEach(FloatConsumer action) A Type Specific foreach function that reduces (un)boxingvoidforEachIndexed(IntFloatConsumer action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.Helper getter function to get the current strategyiterator()Returns a Type-Specific Iterator to reduce (un)boxingbooleanmatchesAll(FloatPredicate filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(FloatPredicate filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(FloatPredicate filter) Helper function to reduce stream usage that allows to filter for no matches.floatreduce(float identity, FloatFloatUnaryOperator operator) Performs a reduction on the elements of this Iterablefloatreduce(FloatFloatUnaryOperator operator) Performs a reduction on the elements of this Iterablebooleanremove(float o) A Type Specific remove function to reduce boxing/unboxingintsize()Object[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.float[]toFloatArray(float[] a) A Type-Specific implementation of toArray.booleantrim(int size) Trims the original collection down to the size of the current elements or the requested size depending which is biggerVon Klasse geerbte Methoden speiger.src.collections.floats.sets.AbstractFloatSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.floats.collections.AbstractFloatCollection
add, contains, containsAll, containsAll, containsAny, containsAny, remFloat, remove, removeAll, removeAll, retainAll, retainAll, toFloatArrayVon Klasse geerbte Methoden java.util.AbstractCollection
isEmpty, removeAll, retainAll, toStringVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, stream, toArrayVon Schnittstelle geerbte Methoden speiger.src.collections.floats.collections.FloatCollection
addAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, spliterator, toFloatArrayVon Schnittstelle geerbte Methoden speiger.src.collections.floats.collections.FloatIterable
arrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.floats.sets.FloatSet
add, contains, remFloat, remove, spliterator, synchronize, synchronize, unmodifiableVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ITrimmable
clearAndTrim, trimVon Schnittstelle geerbte Methoden java.util.Set
containsAll, isEmpty, removeAll, retainAll
-
Konstruktordetails
-
FloatOpenCustomHashSet
Default Contstructor- Parameter:
strategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
Constructor that defines the minimum capacity- Parameter:
minCapacity- the minimum capacity the HashSet is allowed to be.strategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the minimum capacity is negative
-
FloatOpenCustomHashSet
Constructor that defines the minimum capacity and load factor- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the minimum capacity is negativeIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
FloatOpenCustomHashSet
Helper constructor that allow to create a set from unboxed values- Parameter:
array- the elements that should be put into the setstrategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
Helper constructor that allow to create a set from unboxed values- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
FloatOpenCustomHashSet
Helper constructor that allow to create a set from unboxed values- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if offset and length causes to step outside of the arrays range
-
FloatOpenCustomHashSet
public FloatOpenCustomHashSet(float[] array, int offset, int length, float loadFactor, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed values- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1IllegalStateException- if offset and length causes to step outside of the arrays range
-
FloatOpenCustomHashSet
@Deprecated public FloatOpenCustomHashSet(Collection<? extends Float> collection, FloatStrategy strategy) Veraltet.A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the Setstrategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
@Deprecated public FloatOpenCustomHashSet(Collection<? extends Float> collection, float loadFactor, FloatStrategy strategy) Veraltet.A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the Setstrategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the setstrategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the setstrategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatOpenCustomHashSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
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.- Löst aus:
NullPointerException- if Strategy is nullIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
-
Methodendetails
-
getStrategy
Helper getter function to get the current strategy- Gibt zurück:
- the current strategy
-
add
public boolean add(float o) Beschreibung aus Schnittstelle kopiert:FloatCollectionA Type-Specific add function to reduce (un)boxing- Angegeben von:
addin SchnittstelleFloatCollection- Parameter:
o- the element that should be added- Gibt zurück:
- true if the element was added to the collection
-
addAll
Veraltet.Beschreibung aus Klasse kopiert:AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
- Angegeben von:
addAllin SchnittstelleCollection<Float>- Angegeben von:
addAllin SchnittstelleSet<Float>- Setzt außer Kraft:
addAllin KlasseAbstractFloatCollection
-
addAll
Beschreibung aus Schnittstelle kopiert:FloatCollectionA Type-Specific addAll function to reduce (un)boxing- Angegeben von:
addAllin SchnittstelleFloatCollection- Setzt außer Kraft:
addAllin KlasseAbstractFloatCollection- Parameter:
c- the collection of elements that should be added- Gibt zurück:
- true if elements were added into the collection
-
contains
public boolean contains(float o) Beschreibung aus Klasse kopiert:AbstractFloatCollectionA Type-Specific implementation of contains. This implementation iterates over the elements and returns true if the value match.- Angegeben von:
containsin SchnittstelleFloatCollection- Setzt außer Kraft:
containsin KlasseAbstractFloatCollection- Parameter:
o- the element that should be searched for.- Gibt zurück:
- true if the value was found.
-
remove
public boolean remove(float o) Beschreibung aus Schnittstelle kopiert:FloatSetA Type Specific remove function to reduce boxing/unboxing -
trim
public boolean trim(int size) Beschreibung aus Schnittstelle kopiert:ITrimmableTrims the original collection down to the size of the current elements or the requested size depending which is bigger- Angegeben von:
trimin SchnittstelleITrimmable- Parameter:
size- the requested trim size.- Gibt zurück:
- if the internal array has been trimmed.
-
clearAndTrim
public void clearAndTrim(int size) Beschreibung aus Schnittstelle kopiert:ITrimmableTrims the collection down to the requested size and clears all elements while doing so- Angegeben von:
clearAndTrimin SchnittstelleITrimmable- Parameter:
size- the amount of elements that should be allowed
-
iterator
Beschreibung aus Schnittstelle kopiert:FloatCollectionReturns a Type-Specific Iterator to reduce (un)boxing- Angegeben von:
iteratorin SchnittstelleCollection<Float>- Angegeben von:
iteratorin SchnittstelleFloatCollection- Angegeben von:
iteratorin SchnittstelleFloatIterable- Angegeben von:
iteratorin SchnittstelleFloatSet- Angegeben von:
iteratorin SchnittstelleIterable<Float>- Angegeben von:
iteratorin SchnittstelleSet<Float>- Angegeben von:
iteratorin KlasseAbstractFloatSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
toFloatArray
public float[] toFloatArray(float[] a) Beschreibung aus Klasse kopiert:AbstractFloatCollectionA Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.- Angegeben von:
toFloatArrayin SchnittstelleFloatCollection- Setzt außer Kraft:
toFloatArrayin KlasseAbstractFloatCollection- Parameter:
a- array that the elements should be injected to. If null or to small a new array with the right size is created- Gibt zurück:
- an array containing all of the elements in this collection
- Siehe auch:
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Float>- Angegeben von:
toArrayin SchnittstelleSet<Float>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Float>
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Float>- Angegeben von:
toArrayin SchnittstelleSet<Float>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Float>
-
copy
Beschreibung aus Schnittstelle kopiert:FloatCollectionA Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk- Angegeben von:
copyin SchnittstelleFloatCollection- Angegeben von:
copyin SchnittstelleFloatSet- Setzt außer Kraft:
copyin KlasseAbstractFloatSet- Gibt zurück:
- a Shallow Copy of the collection
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Float>- Angegeben von:
clearin SchnittstelleSet<Float>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Float>
-
size
public int size()- Angegeben von:
sizein SchnittstelleCollection<Float>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleSet<Float>- Angegeben von:
sizein KlasseAbstractCollection<Float>- Gibt zurück:
- the size of the implementing Collection
-
forEach
Beschreibung aus Schnittstelle kopiert:FloatIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleFloatIterable- Parameter:
action- The action to be performed for each element- Siehe auch:
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:FloatIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleFloatIterable- Parameter:
action- The action to be performed for each element
-
forEach
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleFloatIterable- Typparameter:
E- the generic type of the Object- Parameter:
input- the object that should be includedaction- The action to be performed for each element
-
matchesAny
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleFloatIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleFloatIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleFloatIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
reduce
Beschreibung aus Schnittstelle kopiert:FloatIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleFloatIterable- Parameter:
identity- the start valueoperator- the operation that should be applied- Gibt zurück:
- the reduction result, returns identity if nothing was found
-
reduce
Beschreibung aus Schnittstelle kopiert:FloatIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleFloatIterable- Parameter:
operator- the operation that should be applied- Gibt zurück:
- the reduction result, returns null value if nothing was found
-
findFirst
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleFloatIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
count
Beschreibung aus Schnittstelle kopiert:FloatIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleFloatIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-