java.lang.Object
java.util.AbstractCollection<Float>
speiger.src.collections.floats.collections.AbstractFloatCollection
speiger.src.collections.floats.sets.AbstractFloatSet
speiger.src.collections.floats.sets.FloatAVLTreeSet
- Alle implementierten Schnittstellen:
Iterable<Float>,Collection<Float>,NavigableSet<Float>,Set<Float>,SortedSet<Float>,FloatCollection,FloatIterable,FloatNavigableSet,FloatSet,FloatSortedSet,ISizeProvider
A Simple Type Specific AVL TreeSet implementation that reduces boxing/unboxing.
It is using a bit more memory then FastUtil,
but it saves a lot of Performance on the Optimized removal and iteration logic.
Which makes the implementation actually useable and does not get outperformed by Javas default implementation.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefault ConstructorFloatAVLTreeSet(float[] array) Helper constructor that allow to create a set from an arrayFloatAVLTreeSet(float[] array, int offset, int length) Helper constructor that allow to create a set from an arrayFloatAVLTreeSet(float[] array, int offset, int length, FloatComparator comp) Helper constructor that allow to create a set from an arrayFloatAVLTreeSet(float[] array, FloatComparator comp) Helper constructor that allow to create a set from an arrayFloatAVLTreeSet(Collection<? extends Float> collection) Veraltet.FloatAVLTreeSet(Collection<? extends Float> collection, FloatComparator comp) Veraltet.FloatAVLTreeSet(Iterator<Float> iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatAVLTreeSet(Iterator<Float> iterator, FloatComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatAVLTreeSet(FloatCollection collection) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.FloatAVLTreeSet(FloatCollection collection, FloatComparator comp) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.FloatAVLTreeSet(FloatIterator iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeFloatAVLTreeSet(FloatIterator iterator, FloatComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeConstructor that allows to define the sorterFloatAVLTreeSet(FloatSortedSet sortedSet) A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(float o) A Type-Specific add function to reduce (un)boxingfloatceiling(float e) A Type Specific ceiling method to reduce boxing/unboxing.voidclear()A Type Specific Comparator methodbooleancontains(float e) A Type-Specific implementation of contains.booleancopy()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 setfloatfloor(float e) A Type Specific floor method to reduce boxing/unboxing.<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.floatA Helper method to get the max value for SubSets.floatA Helper method to get the min value for SubSets.headSet(float toElement, boolean inclusive) A Type Specific HeadSet method to reduce boxing/unboxingfloathigher(float e) A Type Specific higher method to reduce boxing/unboxing.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 setfloatlower(float e) A Type Specific lower method to reduce boxing/unboxing.booleanmatchesAll(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.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 Iterablebooleanremove(float o) A Type Specific remove function to reduce boxing/unboxingbooleanvoidsetDefaultMaxValue(float value) A Helper method to set the max value for SubSets.voidsetDefaultMinValue(float value) A Helper method to set the min value for SubSets.intsize()subSet(float fromElement, boolean fromInclusive, float toElement, boolean toInclusive) A Type Specific SubSet method to reduce boxing/unboxingtailSet(float fromElement, boolean inclusive) A Type Specific TailSet method to reduce boxing/unboxingObject[]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.AbstractFloatSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.floats.collections.AbstractFloatCollection
add, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remFloat, 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, 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.FloatNavigableSet
first, headSet, headSet, headSet, last, pollFirst, pollLast, spliterator, subSet, subSet, subSet, synchronize, synchronize, tailSet, tailSet, tailSet, unmodifiable
-
Konstruktordetails
-
FloatAVLTreeSet
public FloatAVLTreeSet()Default Constructor -
FloatAVLTreeSet
Constructor that allows to define the sorter- Parameter:
comp- the function that decides how the tree is sorted, can be null
-
FloatAVLTreeSet
public FloatAVLTreeSet(float[] array) Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be used
-
FloatAVLTreeSet
public FloatAVLTreeSet(float[] array, int offset, int length) Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be usedoffset- the starting index within the arraylength- the amount of elements that are within the array- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
FloatAVLTreeSet
Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be usedcomp- the sorter of the tree, can be null
-
FloatAVLTreeSet
Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be usedoffset- the starting index within the arraylength- the amount of elements that are within the arraycomp- the sorter of the tree, can be null- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
FloatAVLTreeSet
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.- Parameter:
sortedSet- the set the elements should be added to the TreeSet- Note:
- this also includes the Comparator if present
-
FloatAVLTreeSet
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 TreeSet
-
FloatAVLTreeSet
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 TreeSetcomp- the sorter of the tree, can be null
-
FloatAVLTreeSet
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 TreeSet
-
FloatAVLTreeSet
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 TreeSetcomp- the sorter of the tree, can be null
-
FloatAVLTreeSet
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 set
-
FloatAVLTreeSet
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 setcomp- the sorter of the tree, can be null
-
FloatAVLTreeSet
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 set
-
FloatAVLTreeSet
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 setcomp- the sorter of the tree, can be null
-
-
Methodendetails
-
setDefaultMaxValue
public void setDefaultMaxValue(float value) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Helper method to set the max value for SubSets. (Default: float.MIN_VALUE)- Angegeben von:
setDefaultMaxValuein SchnittstelleFloatNavigableSet- Parameter:
value- the new max value
-
getDefaultMaxValue
public float getDefaultMaxValue()Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Helper method to get the max value for SubSets.- Angegeben von:
getDefaultMaxValuein SchnittstelleFloatNavigableSet- Gibt zurück:
- the default max value.
-
setDefaultMinValue
public void setDefaultMinValue(float value) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Helper method to set the min value for SubSets. (Default: float.MAX_VALUE)- Angegeben von:
setDefaultMinValuein SchnittstelleFloatNavigableSet- Parameter:
value- the new min value
-
getDefaultMinValue
public float getDefaultMinValue()Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Helper method to get the min value for SubSets.- Angegeben von:
getDefaultMinValuein SchnittstelleFloatNavigableSet- Gibt zurück:
- the default min value.
-
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
-
lower
public float lower(float e) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific lower method to reduce boxing/unboxing.- Angegeben von:
lowerin SchnittstelleFloatNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower key that can be found
-
floor
public float floor(float e) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific floor method to reduce boxing/unboxing.- Angegeben von:
floorin SchnittstelleFloatNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower or equal key that can be found
-
higher
public float higher(float e) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific higher method to reduce boxing/unboxing.- Angegeben von:
higherin SchnittstelleFloatNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher key that can be found
-
ceiling
public float ceiling(float e) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific ceiling method to reduce boxing/unboxing.- Angegeben von:
ceilingin SchnittstelleFloatNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher or equal key that can be found
-
lower
- Angegeben von:
lowerin SchnittstelleFloatNavigableSet- Angegeben von:
lowerin SchnittstelleNavigableSet<Float>
-
floor
- Angegeben von:
floorin SchnittstelleFloatNavigableSet- Angegeben von:
floorin SchnittstelleNavigableSet<Float>
-
higher
- Angegeben von:
higherin SchnittstelleFloatNavigableSet- Angegeben von:
higherin SchnittstelleNavigableSet<Float>
-
ceiling
- Angegeben von:
ceilingin SchnittstelleFloatNavigableSet- Angegeben von:
ceilingin SchnittstelleNavigableSet<Float>
-
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.
-
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.
-
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
-
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
-
contains
public boolean contains(float e) 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:
e- the element that should be searched for.- Gibt zurück:
- true if the value was found.
-
contains
Beschreibung aus Klasse kopiert:AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
containsin SchnittstelleCollection<Float>- Angegeben von:
containsin SchnittstelleFloatCollection- Angegeben von:
containsin SchnittstelleFloatSet- Angegeben von:
containsin SchnittstelleSet<Float>- Setzt außer Kraft:
containsin KlasseAbstractFloatCollection
-
firstFloat
public float firstFloat()Beschreibung aus Schnittstelle kopiert:FloatSortedSetA method to get the first element in the set- Angegeben von:
firstFloatin SchnittstelleFloatSortedSet- Gibt zurück:
- first element in the set
-
lastFloat
public float lastFloat()Beschreibung aus Schnittstelle kopiert:FloatSortedSetA method to get the last element in the set- Angegeben von:
lastFloatin SchnittstelleFloatSortedSet- Gibt zurück:
- last element in the set
-
remove
public boolean remove(float o) Beschreibung aus Schnittstelle kopiert:FloatSetA Type Specific remove function to reduce boxing/unboxing -
remove
Beschreibung aus Klasse kopiert:AbstractFloatCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
removein SchnittstelleCollection<Float>- Angegeben von:
removein SchnittstelleFloatCollection- Angegeben von:
removein SchnittstelleFloatSet- Angegeben von:
removein SchnittstelleSet<Float>- Setzt außer Kraft:
removein KlasseAbstractFloatCollection
-
pollFirstFloat
public float pollFirstFloat()Beschreibung aus Schnittstelle kopiert:FloatSortedSetA method to get and remove the first element in the set- Angegeben von:
pollFirstFloatin SchnittstelleFloatSortedSet- Gibt zurück:
- first element in the set
-
pollLastFloat
public float pollLastFloat()Beschreibung aus Schnittstelle kopiert:FloatSortedSetA method to get and remove the last element in the set- Angegeben von:
pollLastFloatin SchnittstelleFloatSortedSet- Gibt zurück:
- last element in the set
-
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
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Float>- Angegeben von:
clearin SchnittstelleSet<Float>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Float>
-
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 SchnittstelleFloatNavigableSet- Angegeben von:
copyin SchnittstelleFloatSet- Angegeben von:
copyin SchnittstelleFloatSortedSet- Setzt außer Kraft:
copyin KlasseAbstractFloatSet- Gibt zurück:
- a Shallow Copy of the collection
-
comparator
Beschreibung aus Schnittstelle kopiert:FloatSortedSetA Type Specific Comparator method- Angegeben von:
comparatorin SchnittstelleFloatSortedSet- Angegeben von:
comparatorin SchnittstelleSortedSet<Float>- Gibt zurück:
- the type specific comparator
-
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 SchnittstelleFloatNavigableSet- Angegeben von:
iteratorin SchnittstelleFloatSet- Angegeben von:
iteratorin SchnittstelleFloatSortedSet- Angegeben von:
iteratorin SchnittstelleIterable<Float>- Angegeben von:
iteratorin SchnittstelleNavigableSet<Float>- Angegeben von:
iteratorin SchnittstelleSet<Float>- Angegeben von:
iteratorin KlasseAbstractFloatSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
iterator
Beschreibung aus Schnittstelle kopiert:FloatSortedSetA type Specific Iterator starting from a given key- Angegeben von:
iteratorin SchnittstelleFloatSortedSet- Parameter:
fromElement- the element the iterator should start from- Gibt zurück:
- a iterator starting from the given element
-
descendingIterator
- Angegeben von:
descendingIteratorin SchnittstelleFloatNavigableSet- Angegeben von:
descendingIteratorin SchnittstelleNavigableSet<Float>- Gibt zurück:
- a Type Specific desendingIterator
-
subSet
public FloatNavigableSet subSet(float fromElement, boolean fromInclusive, float toElement, boolean toInclusive) Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific SubSet method to reduce boxing/unboxing- Angegeben von:
subSetin SchnittstelleFloatNavigableSet- Parameter:
fromElement- where the SubSet should startfromInclusive- if the fromElement is inclusive or nottoElement- where the SubSet should endtoInclusive- if the toElement is inclusive or not- Gibt zurück:
- a SubSet that is within the range of the desired range
-
headSet
Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific HeadSet method to reduce boxing/unboxing- Angegeben von:
headSetin SchnittstelleFloatNavigableSet- Parameter:
toElement- where the HeadSet should endinclusive- if the toElement is inclusive or not- Gibt zurück:
- a HeadSet that is within the range of the desired range
-
tailSet
Beschreibung aus Schnittstelle kopiert:FloatNavigableSetA Type Specific TailSet method to reduce boxing/unboxing- Angegeben von:
tailSetin SchnittstelleFloatNavigableSet- Parameter:
fromElement- where the TailSet should startinclusive- if the fromElement is inclusive or not- Gibt zurück:
- a TailSet that is within the range of the desired range
-
descendingSet
- Angegeben von:
descendingSetin SchnittstelleFloatNavigableSet- Angegeben von:
descendingSetin SchnittstelleNavigableSet<Float>- Gibt zurück:
- a Type Specific desendingSet
-