java.lang.Object
java.util.AbstractCollection<Double>
speiger.src.collections.doubles.collections.AbstractDoubleCollection
speiger.src.collections.doubles.sets.AbstractDoubleSet
speiger.src.collections.doubles.sets.DoubleOpenHashSet
- Alle implementierten Schnittstellen:
Iterable<Double>,Collection<Double>,Set<Double>,DoubleCollection,DoubleIterable,DoubleSet,ISizeProvider,ITrimmable
- Bekannte direkte Unterklassen:
DoubleLinkedOpenHashSet
A Type Specific Custom implementation of the HashSet
Instead of using Wrapper Object Arrays for storing keys and values there is dedicated arrays for storing keys.
Extra to that there is a couple quality of life functions provided
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefault ConstructorDoubleOpenHashSet(double[] array) Helper constructor that allow to create a set from unboxed valuesDoubleOpenHashSet(double[] array, float loadFactor) Helper constructor that allow to create a set from unboxed valuesDoubleOpenHashSet(double[] array, int offset, int length) Helper constructor that allow to create a set from unboxed valuesDoubleOpenHashSet(double[] array, int offset, int length, float loadFactor) Helper constructor that allow to create a set from unboxed valuesDoubleOpenHashSet(int minCapacity) Constructor that defines the minimum capacityDoubleOpenHashSet(int minCapacity, float loadFactor) Constructor that defines the minimum capacity and load factorDoubleOpenHashSet(Collection<? extends Double> collection) Veraltet.DoubleOpenHashSet(Collection<? extends Double> collection, float loadFactor) Veraltet.DoubleOpenHashSet(Iterator<Double> iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeDoubleOpenHashSet(Iterator<Double> iterator, float loadFactor) A Helper constructor that allows to create a set from a iterator of an unknown sizeDoubleOpenHashSet(DoubleCollection collection) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.DoubleOpenHashSet(DoubleCollection collection, float loadFactor) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.DoubleOpenHashSet(DoubleIterator iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeDoubleOpenHashSet(DoubleIterator iterator, float loadFactor) A Helper constructor that allows to create a set from a iterator of an unknown size -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(double o) A Type-Specific add function to reduce (un)boxingbooleanaddAll(Collection<? extends Double> 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(double o) A Type-Specific implementation of contains.booleancopy()A Function that does a shallow clone of the Collection itself.intcount(DoublePredicate filter) Helper function to reduce stream usage that allows to count the valid elements.doublefindFirst(DoublePredicate filter) Helper function to reduce stream usage that allows to filter for the first match.<E> voidforEach(E input, ObjectDoubleConsumer<E> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidforEach(DoubleConsumer action) A Type Specific foreach function that reduces (un)boxingvoidforEachIndexed(IntDoubleConsumer 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)boxingbooleanmatchesAll(DoublePredicate filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(DoublePredicate filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(DoublePredicate filter) Helper function to reduce stream usage that allows to filter for no matches.doublereduce(double identity, DoubleDoubleUnaryOperator operator) Performs a reduction on the elements of this Iterabledoublereduce(DoubleDoubleUnaryOperator operator) Performs a reduction on the elements of this Iterablebooleanremove(double o) A Type Specific remove function to reduce boxing/unboxingbooleanintsize()Object[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.double[]toDoubleArray(double[] 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.doubles.sets.AbstractDoubleSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.doubles.collections.AbstractDoubleCollection
add, containsAll, containsAll, containsAny, containsAny, remDouble, removeAll, removeAll, retainAll, retainAll, toDoubleArrayVon 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.doubles.collections.DoubleCollection
addAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, spliterator, toDoubleArrayVon Schnittstelle geerbte Methoden speiger.src.collections.doubles.collections.DoubleIterable
arrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.doubles.sets.DoubleSet
add, remDouble, 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
-
DoubleOpenHashSet
public DoubleOpenHashSet()Default Constructor -
DoubleOpenHashSet
public DoubleOpenHashSet(int minCapacity) Constructor that defines the minimum capacity- Parameter:
minCapacity- the minimum capacity the HashSet is allowed to be.- Löst aus:
IllegalStateException- if the minimum capacity is negative
-
DoubleOpenHashSet
public DoubleOpenHashSet(int minCapacity, float loadFactor) 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 resize- Löst aus:
IllegalStateException- if the minimum capacity is negativeIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
DoubleOpenHashSet
public DoubleOpenHashSet(double[] array) Helper constructor that allow to create a set from unboxed values- Parameter:
array- the elements that should be put into the set
-
DoubleOpenHashSet
public DoubleOpenHashSet(double[] array, float loadFactor) 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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
DoubleOpenHashSet
public DoubleOpenHashSet(double[] array, int offset, int length) 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 array- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
DoubleOpenHashSet
public DoubleOpenHashSet(double[] array, int offset, int length, float loadFactor) 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 resize- Löst aus:
IllegalStateException- 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
-
DoubleOpenHashSet
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 Set
-
DoubleOpenHashSet
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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
DoubleOpenHashSet
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 Set
-
DoubleOpenHashSet
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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
DoubleOpenHashSet
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
-
DoubleOpenHashSet
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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
DoubleOpenHashSet
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
-
DoubleOpenHashSet
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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
-
Methodendetails
-
add
public boolean add(double o) Beschreibung aus Schnittstelle kopiert:DoubleCollectionA Type-Specific add function to reduce (un)boxing- Angegeben von:
addin SchnittstelleDoubleCollection- 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:AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
- Angegeben von:
addAllin SchnittstelleCollection<Double>- Angegeben von:
addAllin SchnittstelleSet<Double>- Setzt außer Kraft:
addAllin KlasseAbstractDoubleCollection
-
addAll
Beschreibung aus Schnittstelle kopiert:DoubleCollectionA Type-Specific addAll function to reduce (un)boxing- Angegeben von:
addAllin SchnittstelleDoubleCollection- Setzt außer Kraft:
addAllin KlasseAbstractDoubleCollection- Parameter:
c- the collection of elements that should be added- Gibt zurück:
- true if elements were added into the collection
-
contains
Beschreibung aus Klasse kopiert:AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
containsin SchnittstelleCollection<Double>- Angegeben von:
containsin SchnittstelleDoubleCollection- Angegeben von:
containsin SchnittstelleDoubleSet- Angegeben von:
containsin SchnittstelleSet<Double>- Setzt außer Kraft:
containsin KlasseAbstractDoubleCollection
-
remove
Beschreibung aus Klasse kopiert:AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
removein SchnittstelleCollection<Double>- Angegeben von:
removein SchnittstelleDoubleCollection- Angegeben von:
removein SchnittstelleDoubleSet- Angegeben von:
removein SchnittstelleSet<Double>- Setzt außer Kraft:
removein KlasseAbstractDoubleCollection
-
contains
public boolean contains(double o) Beschreibung aus Klasse kopiert:AbstractDoubleCollectionA Type-Specific implementation of contains. This implementation iterates over the elements and returns true if the value match.- Angegeben von:
containsin SchnittstelleDoubleCollection- Setzt außer Kraft:
containsin KlasseAbstractDoubleCollection- Parameter:
o- the element that should be searched for.- Gibt zurück:
- true if the value was found.
-
remove
public boolean remove(double o) Beschreibung aus Schnittstelle kopiert:DoubleSetA 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
-
toDoubleArray
public double[] toDoubleArray(double[] a) Beschreibung aus Klasse kopiert:AbstractDoubleCollectionA Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.- Angegeben von:
toDoubleArrayin SchnittstelleDoubleCollection- Setzt außer Kraft:
toDoubleArrayin KlasseAbstractDoubleCollection- 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<Double>- Angegeben von:
toArrayin SchnittstelleSet<Double>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Double>
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Double>- Angegeben von:
toArrayin SchnittstelleSet<Double>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Double>
-
forEach
Beschreibung aus Schnittstelle kopiert:DoubleIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleDoubleIterable- Parameter:
action- The action to be performed for each element- Siehe auch:
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:DoubleIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleDoubleIterable- Parameter:
action- The action to be performed for each element
-
forEach
Beschreibung aus Schnittstelle kopiert:DoubleIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleDoubleIterable- 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:DoubleIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleDoubleIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:DoubleIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleDoubleIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:DoubleIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleDoubleIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
reduce
Beschreibung aus Schnittstelle kopiert:DoubleIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleDoubleIterable- 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:DoubleIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleDoubleIterable- 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:DoubleIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleDoubleIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
count
Beschreibung aus Schnittstelle kopiert:DoubleIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleDoubleIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
iterator
Beschreibung aus Schnittstelle kopiert:DoubleCollectionReturns a Type-Specific Iterator to reduce (un)boxing- Angegeben von:
iteratorin SchnittstelleCollection<Double>- Angegeben von:
iteratorin SchnittstelleDoubleCollection- Angegeben von:
iteratorin SchnittstelleDoubleIterable- Angegeben von:
iteratorin SchnittstelleDoubleSet- Angegeben von:
iteratorin SchnittstelleIterable<Double>- Angegeben von:
iteratorin SchnittstelleSet<Double>- Angegeben von:
iteratorin KlasseAbstractDoubleSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
copy
Beschreibung aus Schnittstelle kopiert:DoubleCollectionA 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 SchnittstelleDoubleCollection- Angegeben von:
copyin SchnittstelleDoubleSet- Setzt außer Kraft:
copyin KlasseAbstractDoubleSet- Gibt zurück:
- a Shallow Copy of the collection
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Double>- Angegeben von:
clearin SchnittstelleSet<Double>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Double>
-
size
public int size()- Angegeben von:
sizein SchnittstelleCollection<Double>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleSet<Double>- Angegeben von:
sizein KlasseAbstractCollection<Double>- Gibt zurück:
- the size of the implementing Collection
-