Modul speiger.src.collections
Klasse FloatLinkedOpenCustomHashSet
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
speiger.src.collections.floats.sets.FloatLinkedOpenCustomHashSet
- Alle implementierten Schnittstellen:
Iterable<Float>,Collection<Float>,Set<Float>,FloatCollection,FloatIterable,FloatOrderedSet,FloatSet,ISizeProvider,ITrimmable
A Type Specific LinkedHashSet that allows for custom HashControl. That uses arrays to create links between nodes.
For cases where Objects/primitive do not allow hashcoding this can be really useful and provide a lot of control.
This implementation of SortedSet does not support SubSet of any kind. It implements the interface due to sortability and first/last access
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFloatLinkedOpenCustomHashSet(float[] array, float loadFactor, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatLinkedOpenCustomHashSet(float[] array, int offset, int length, float loadFactor, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatLinkedOpenCustomHashSet(float[] array, int offset, int length, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatLinkedOpenCustomHashSet(float[] array, FloatStrategy strategy) Helper constructor that allow to create a set from unboxed valuesFloatLinkedOpenCustomHashSet(int minCapacity, float loadFactor, FloatStrategy strategy) Constructor that defines the minimum capacity and load factorFloatLinkedOpenCustomHashSet(int minCapacity, FloatStrategy strategy) Constructor that defines the minimum capacityFloatLinkedOpenCustomHashSet(Collection<? extends Float> collection, float loadFactor, FloatStrategy strategy) Veraltet.FloatLinkedOpenCustomHashSet(Collection<? extends Float> collection, FloatStrategy strategy) Veraltet.FloatLinkedOpenCustomHashSet(Iterator<Float> iterator, float loadFactor, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatLinkedOpenCustomHashSet(Iterator<Float> iterator, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatLinkedOpenCustomHashSet(FloatCollection collection, float loadFactor, FloatStrategy strategy) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.FloatLinkedOpenCustomHashSet(FloatCollection collection, FloatStrategy strategy) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.FloatLinkedOpenCustomHashSet(FloatIterator iterator, float loadFactor, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatLinkedOpenCustomHashSet(FloatIterator iterator, FloatStrategy strategy) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatLinkedOpenCustomHashSet(FloatStrategy strategy) Default Contstructor -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanaddAndMoveToFirst(float o) A customized add method that allows you to insert into the first index.booleanaddAndMoveToLast(float o) A customized add method that allows you to insert into the last index.voidclear()voidclearAndTrim(int size) Trims the collection down to the requested size and clears all elements while doing socopy()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.floatA method to get the first element in the set<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.iterator()Returns a Type-Specific Iterator to reduce (un)boxingiterator(float fromElement) A type Specific Iterator starting from a given keyfloatA method to get the last element in the setbooleanmatchesAll(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.booleanmoveToFirst(float o) A specific move method to move a given key to the first index.booleanmoveToLast(float o) A specific move method to move a given key to the last index.floatA method to get and remove the first element in the setfloatA method to get and remove the last element in the setfloatreduce(float identity, FloatFloatUnaryOperator operator) Performs a reduction on the elements of this Iterablefloatreduce(FloatFloatUnaryOperator operator) Performs a reduction on the elements of this IterableObject[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.float[]toFloatArray(float[] a) A Type-Specific implementation of toArray.Von Klasse geerbte Methoden speiger.src.collections.floats.sets.FloatOpenCustomHashSet
add, addAll, addAll, contains, getStrategy, remove, size, trimVon 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
add, addAll, addAll, addAll, addAll, contains, 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.FloatOrderedSet
spliterator, synchronize, synchronize, unmodifiableVon Schnittstelle geerbte Methoden speiger.src.collections.floats.sets.FloatSet
add, contains, remFloat, remove, removeVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ISizeProvider
sizeVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ITrimmable
clearAndTrim, trim
-
Konstruktordetails
-
FloatLinkedOpenCustomHashSet
Default Contstructor- Parameter:
strategy- the strategy that allows hash control.- Löst aus:
NullPointerException- if Strategy is null
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
public FloatLinkedOpenCustomHashSet(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
-
FloatLinkedOpenCustomHashSet
@Deprecated public FloatLinkedOpenCustomHashSet(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
-
FloatLinkedOpenCustomHashSet
@Deprecated public FloatLinkedOpenCustomHashSet(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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
public FloatLinkedOpenCustomHashSet(FloatCollection collection, float loadFactor, FloatStrategy strategy) 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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
public FloatLinkedOpenCustomHashSet(Iterator<Float> iterator, float loadFactor, FloatStrategy strategy) 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
-
FloatLinkedOpenCustomHashSet
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
-
FloatLinkedOpenCustomHashSet
public FloatLinkedOpenCustomHashSet(FloatIterator iterator, float loadFactor, FloatStrategy strategy) 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
-
addAndMoveToFirst
public boolean addAndMoveToFirst(float o) Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA customized add method that allows you to insert into the first index.- Angegeben von:
addAndMoveToFirstin SchnittstelleFloatOrderedSet- Parameter:
o- the element that should be inserted- Gibt zurück:
- true if it was added
- Siehe auch:
-
addAndMoveToLast
public boolean addAndMoveToLast(float o) Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA customized add method that allows you to insert into the last index.- Angegeben von:
addAndMoveToLastin SchnittstelleFloatOrderedSet- Parameter:
o- the element that should be inserted- Gibt zurück:
- true if it was added
- Siehe auch:
-
moveToFirst
public boolean moveToFirst(float o) Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA specific move method to move a given key to the first index.- Angegeben von:
moveToFirstin SchnittstelleFloatOrderedSet- Parameter:
o- that should be moved to the first index- Gibt zurück:
- true if the value was moved.
-
moveToLast
public boolean moveToLast(float o) Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA specific move method to move a given key to the last index.- Angegeben von:
moveToLastin SchnittstelleFloatOrderedSet- Parameter:
o- that should be moved to the first last- Gibt zurück:
- true if the value was moved.
-
firstFloat
public float firstFloat()Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA method to get the first element in the set- Angegeben von:
firstFloatin SchnittstelleFloatOrderedSet- Gibt zurück:
- first element in the set
-
pollFirstFloat
public float pollFirstFloat()Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA method to get and remove the first element in the set- Angegeben von:
pollFirstFloatin SchnittstelleFloatOrderedSet- Gibt zurück:
- first element in the set
-
lastFloat
public float lastFloat()Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA method to get the last element in the set- Angegeben von:
lastFloatin SchnittstelleFloatOrderedSet- Gibt zurück:
- last element in the set
-
pollLastFloat
public float pollLastFloat()Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA method to get and remove the last element in the set- Angegeben von:
pollLastFloatin SchnittstelleFloatOrderedSet- Gibt zurück:
- last element in the set
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Float>- Angegeben von:
clearin SchnittstelleSet<Float>- Setzt außer Kraft:
clearin KlasseFloatOpenCustomHashSet
-
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- Setzt außer Kraft:
clearAndTrimin KlasseFloatOpenCustomHashSet- Parameter:
size- the amount of elements that should be allowed
-
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 KlasseFloatOpenCustomHashSet- 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 KlasseFloatOpenCustomHashSet
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Float>- Angegeben von:
toArrayin SchnittstelleSet<Float>- Setzt außer Kraft:
toArrayin KlasseFloatOpenCustomHashSet
-
forEach
Beschreibung aus Schnittstelle kopiert:FloatIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleFloatIterable- Setzt außer Kraft:
forEachin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
forEachIndexedin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
forEachin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
matchesAnyin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
matchesNonein KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
matchesAllin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
reducein KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
reducein KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
findFirstin KlasseFloatOpenCustomHashSet- 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- Setzt außer Kraft:
countin KlasseFloatOpenCustomHashSet- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
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 SchnittstelleFloatOrderedSet- Angegeben von:
iteratorin SchnittstelleFloatSet- Angegeben von:
iteratorin SchnittstelleIterable<Float>- Angegeben von:
iteratorin SchnittstelleSet<Float>- Setzt außer Kraft:
iteratorin KlasseFloatOpenCustomHashSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
iterator
Beschreibung aus Schnittstelle kopiert:FloatOrderedSetA type Specific Iterator starting from a given key- Angegeben von:
iteratorin SchnittstelleFloatOrderedSet- Parameter:
fromElement- the element the iterator should start from- Gibt zurück:
- a iterator starting from the given element
-
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 SchnittstelleFloatOrderedSet- Angegeben von:
copyin SchnittstelleFloatSet- Setzt außer Kraft:
copyin KlasseFloatOpenCustomHashSet- Gibt zurück:
- a Shallow Copy of the collection
-