public class DoubleOpenCustomHashSet extends AbstractDoubleSet implements ITrimmable
ISizeProvider.CollectionSize| Constructor and Description |
|---|
DoubleOpenCustomHashSet(java.util.Collection<? extends java.lang.Double> collection,
DoubleStrategy strategy)
Deprecated.
|
DoubleOpenCustomHashSet(java.util.Collection<? extends java.lang.Double> collection,
float loadFactor,
DoubleStrategy strategy)
Deprecated.
|
DoubleOpenCustomHashSet(double[] array,
DoubleStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
DoubleOpenCustomHashSet(double[] array,
float loadFactor,
DoubleStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
DoubleOpenCustomHashSet(double[] array,
int offset,
int length,
DoubleStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
DoubleOpenCustomHashSet(double[] array,
int offset,
int length,
float loadFactor,
DoubleStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
DoubleOpenCustomHashSet(DoubleCollection collection,
DoubleStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleOpenCustomHashSet(DoubleCollection collection,
float loadFactor,
DoubleStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleOpenCustomHashSet(DoubleIterator iterator,
DoubleStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleOpenCustomHashSet(DoubleIterator iterator,
float loadFactor,
DoubleStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleOpenCustomHashSet(DoubleStrategy strategy)
Default Contstructor
|
DoubleOpenCustomHashSet(int minCapacity,
DoubleStrategy strategy)
Constructor that defines the minimum capacity
|
DoubleOpenCustomHashSet(int minCapacity,
float loadFactor,
DoubleStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
DoubleOpenCustomHashSet(java.util.Iterator<java.lang.Double> iterator,
DoubleStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleOpenCustomHashSet(java.util.Iterator<java.lang.Double> iterator,
float loadFactor,
DoubleStrategy 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(double o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Double> c)
Deprecated.
|
boolean |
addAll(DoubleCollection 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(double o)
A Type-Specific implementation of contains.
|
DoubleOpenCustomHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(java.util.function.DoublePredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
double |
findFirst(java.util.function.DoublePredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(DoubleConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectDoubleConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEachIndexed(IntDoubleConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
DoubleStrategy |
getStrategy()
Helper getter function to get the current strategy
|
DoubleIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(java.util.function.DoublePredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.DoublePredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.DoublePredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
double |
reduce(double identity,
DoubleDoubleUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
double |
reduce(DoubleDoubleUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(double 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, remDouble, remove, removeAll, removeAll, retainAll, retainAll, toDoubleArray, toDoubleArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remDouble, remove, spliterator, synchronize, synchronize, unmodifiablecontainsAll, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toDoubleArray, toDoubleArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic DoubleOpenCustomHashSet(DoubleStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic DoubleOpenCustomHashSet(int minCapacity,
DoubleStrategy 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 DoubleOpenCustomHashSet(int minCapacity,
float loadFactor,
DoubleStrategy 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 DoubleOpenCustomHashSet(double[] array,
DoubleStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic DoubleOpenCustomHashSet(double[] array,
float loadFactor,
DoubleStrategy 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 DoubleOpenCustomHashSet(double[] array,
int offset,
int length,
DoubleStrategy 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 DoubleOpenCustomHashSet(double[] array,
int offset,
int length,
float loadFactor,
DoubleStrategy 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 DoubleOpenCustomHashSet(java.util.Collection<? extends java.lang.Double> collection,
DoubleStrategy 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 DoubleOpenCustomHashSet(java.util.Collection<? extends java.lang.Double> collection,
float loadFactor,
DoubleStrategy 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 DoubleOpenCustomHashSet(DoubleCollection collection, DoubleStrategy 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 DoubleOpenCustomHashSet(DoubleCollection collection, float loadFactor, DoubleStrategy 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 DoubleOpenCustomHashSet(java.util.Iterator<java.lang.Double> iterator,
DoubleStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic DoubleOpenCustomHashSet(java.util.Iterator<java.lang.Double> iterator,
float loadFactor,
DoubleStrategy 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 DoubleOpenCustomHashSet(DoubleIterator iterator, DoubleStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic DoubleOpenCustomHashSet(DoubleIterator iterator, float loadFactor, DoubleStrategy 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 DoubleStrategy getStrategy()
public boolean add(double o)
DoubleCollectionadd in interface DoubleCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Double> c)
AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Double>addAll in interface java.util.Set<java.lang.Double>addAll in class AbstractDoubleCollectionpublic boolean addAll(DoubleCollection c)
DoubleCollectionaddAll in interface DoubleCollectionaddAll in class AbstractDoubleCollectionc - the collection of elements that should be addedpublic boolean contains(double o)
AbstractDoubleCollectioncontains in interface DoubleCollectioncontains in class AbstractDoubleCollectiono - the element that should be searched for.public boolean remove(double o)
DoubleSetpublic 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 DoubleIterator iterator()
DoubleCollectioniterator in interface java.lang.Iterable<java.lang.Double>iterator in interface java.util.Collection<java.lang.Double>iterator in interface java.util.Set<java.lang.Double>iterator in interface DoubleCollectioniterator in interface DoubleIterableiterator in interface DoubleSetiterator in class AbstractDoubleSetCollection.iterator()public DoubleOpenCustomHashSet copy()
DoubleCollectioncopy in interface DoubleCollectioncopy in interface DoubleSetcopy in class AbstractDoubleSetpublic void clear()
clear in interface java.util.Collection<java.lang.Double>clear in interface java.util.Set<java.lang.Double>clear in class java.util.AbstractCollection<java.lang.Double>public int size()
size in interface java.util.Collection<java.lang.Double>size in interface java.util.Set<java.lang.Double>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Double>public void forEach(DoubleConsumer action)
DoubleIterableforEach in interface DoubleIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntDoubleConsumer action)
DoubleIterableforEachIndexed in interface DoubleIterableaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectDoubleConsumer<E> action)
DoubleIterableforEach in interface DoubleIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.DoublePredicate filter)
DoubleIterablematchesAny in interface DoubleIterablefilter - that should be appliedpublic boolean matchesNone(java.util.function.DoublePredicate filter)
DoubleIterablematchesNone in interface DoubleIterablefilter - that should be appliedpublic boolean matchesAll(java.util.function.DoublePredicate filter)
DoubleIterablematchesAll in interface DoubleIterablefilter - that should be appliedpublic double reduce(double identity,
DoubleDoubleUnaryOperator operator)
DoubleIterablereduce in interface DoubleIterableidentity - the start valueoperator - the operation that should be appliedpublic double reduce(DoubleDoubleUnaryOperator operator)
DoubleIterablereduce in interface DoubleIterableoperator - the operation that should be appliedpublic double findFirst(java.util.function.DoublePredicate filter)
DoubleIterablefindFirst in interface DoubleIterablefilter - that should be appliedpublic int count(java.util.function.DoublePredicate filter)
DoubleIterablecount in interface DoubleIterablefilter - that should be applied