public class DoubleLinkedOpenHashSet extends DoubleOpenHashSet implements DoubleOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
DoubleLinkedOpenHashSet()
Default Constructor
|
DoubleLinkedOpenHashSet(java.util.Collection<? extends java.lang.Double> collection)
Deprecated.
|
DoubleLinkedOpenHashSet(java.util.Collection<? extends java.lang.Double> collection,
float loadFactor)
Deprecated.
|
DoubleLinkedOpenHashSet(double[] array)
Helper constructor that allow to create a set from unboxed values
|
DoubleLinkedOpenHashSet(double[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
DoubleLinkedOpenHashSet(double[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
DoubleLinkedOpenHashSet(double[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
DoubleLinkedOpenHashSet(DoubleCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleLinkedOpenHashSet(DoubleCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleLinkedOpenHashSet(DoubleIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleLinkedOpenHashSet(DoubleIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
DoubleLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
DoubleLinkedOpenHashSet(java.util.Iterator<java.lang.Double> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleLinkedOpenHashSet(java.util.Iterator<java.lang.Double> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(double o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(double o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
DoubleLinkedOpenHashSet |
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.
|
double |
firstDouble()
A method to get the first element in the set
|
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.
|
DoubleListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
DoubleBidirectionalIterator |
iterator(double fromElement)
A type Specific Iterator starting from a given key
|
double |
lastDouble()
A method to get the last element in the set
|
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.
|
boolean |
moveToFirst(double o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(double o)
A specific move method to move a given key to the last index.
|
double |
pollFirstDouble()
A method to get and remove the first element in the set
|
double |
pollLastDouble()
A method to get and remove the last element in the set
|
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
|
add, addAll, addAll, contains, contains, remove, remove, size, trimequals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remDouble, removeAll, removeAll, retainAll, retainAll, toDoubleArray, toDoubleArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, contains, remDouble, remove, removeaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArrayadd, addAll, addAll, addAll, addAll, contains, 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, sortedof, sizeclearAndTrim, trimpublic DoubleLinkedOpenHashSet()
public DoubleLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic DoubleLinkedOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public DoubleLinkedOpenHashSet(double[] array)
array - the elements that should be put into the setpublic DoubleLinkedOpenHashSet(double[] array,
float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public DoubleLinkedOpenHashSet(double[] array,
int offset,
int length)
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 arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic DoubleLinkedOpenHashSet(double[] array,
int offset,
int length,
float loadFactor)
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 resizejava.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 DoubleLinkedOpenHashSet(java.util.Collection<? extends java.lang.Double> collection)
collection - the set the elements should be added to the Set@Deprecated
public DoubleLinkedOpenHashSet(java.util.Collection<? extends java.lang.Double> collection,
float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public DoubleLinkedOpenHashSet(DoubleCollection collection)
collection - the set the elements should be added to the Setpublic DoubleLinkedOpenHashSet(DoubleCollection collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public DoubleLinkedOpenHashSet(java.util.Iterator<java.lang.Double> iterator)
iterator - the elements that should be added to the setpublic DoubleLinkedOpenHashSet(java.util.Iterator<java.lang.Double> iterator,
float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public DoubleLinkedOpenHashSet(DoubleIterator iterator)
iterator - the elements that should be added to the setpublic DoubleLinkedOpenHashSet(DoubleIterator iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean addAndMoveToFirst(double o)
DoubleOrderedSetaddAndMoveToFirst in interface DoubleOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(double o)
DoubleOrderedSetaddAndMoveToLast in interface DoubleOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(double o)
DoubleOrderedSetmoveToFirst in interface DoubleOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(double o)
DoubleOrderedSetmoveToLast in interface DoubleOrderedSeto - that should be moved to the first lastpublic double firstDouble()
DoubleOrderedSetfirstDouble in interface DoubleOrderedSetpublic double pollFirstDouble()
DoubleOrderedSetpollFirstDouble in interface DoubleOrderedSetpublic double lastDouble()
DoubleOrderedSetlastDouble in interface DoubleOrderedSetpublic double pollLastDouble()
DoubleOrderedSetpollLastDouble in interface DoubleOrderedSetpublic void forEach(DoubleConsumer action)
DoubleIterableforEach in interface DoubleIterableforEach in class DoubleOpenHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntDoubleConsumer action)
DoubleIterableforEachIndexed in interface DoubleIterableforEachIndexed in class DoubleOpenHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectDoubleConsumer<E> action)
DoubleIterableforEach in interface DoubleIterableforEach in class DoubleOpenHashSetE - 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 DoubleIterablematchesAny in class DoubleOpenHashSetfilter - that should be appliedpublic boolean matchesNone(java.util.function.DoublePredicate filter)
DoubleIterablematchesNone in interface DoubleIterablematchesNone in class DoubleOpenHashSetfilter - that should be appliedpublic boolean matchesAll(java.util.function.DoublePredicate filter)
DoubleIterablematchesAll in interface DoubleIterablematchesAll in class DoubleOpenHashSetfilter - that should be appliedpublic double reduce(double identity,
DoubleDoubleUnaryOperator operator)
DoubleIterablereduce in interface DoubleIterablereduce in class DoubleOpenHashSetidentity - the start valueoperator - the operation that should be appliedpublic double reduce(DoubleDoubleUnaryOperator operator)
DoubleIterablereduce in interface DoubleIterablereduce in class DoubleOpenHashSetoperator - the operation that should be appliedpublic double findFirst(java.util.function.DoublePredicate filter)
DoubleIterablefindFirst in interface DoubleIterablefindFirst in class DoubleOpenHashSetfilter - that should be appliedpublic int count(java.util.function.DoublePredicate filter)
DoubleIterablecount in interface DoubleIterablecount in class DoubleOpenHashSetfilter - that should be appliedpublic void clear()
clear in interface java.util.Collection<java.lang.Double>clear in interface java.util.Set<java.lang.Double>clear in class DoubleOpenHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class DoubleOpenHashSetsize - the amount of elements that should be allowedpublic DoubleListIterator 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 DoubleOrderedSetiterator in interface DoubleSetiterator in class DoubleOpenHashSetCollection.iterator()public DoubleBidirectionalIterator iterator(double fromElement)
DoubleOrderedSetiterator in interface DoubleOrderedSetfromElement - the element the iterator should start frompublic DoubleLinkedOpenHashSet copy()
DoubleCollectioncopy in interface DoubleCollectioncopy in interface DoubleOrderedSetcopy in interface DoubleSetcopy in class DoubleOpenHashSet