public class DoubleAVLTreeSet extends AbstractDoubleSet implements DoubleNavigableSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
DoubleAVLTreeSet()
Default Constructor
|
DoubleAVLTreeSet(java.util.Collection<? extends java.lang.Double> collection)
Deprecated.
|
DoubleAVLTreeSet(java.util.Collection<? extends java.lang.Double> collection,
DoubleComparator comp)
Deprecated.
|
DoubleAVLTreeSet(double[] array)
Helper constructor that allow to create a set from an array
|
DoubleAVLTreeSet(double[] array,
DoubleComparator comp)
Helper constructor that allow to create a set from an array
|
DoubleAVLTreeSet(double[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
DoubleAVLTreeSet(double[] array,
int offset,
int length,
DoubleComparator comp)
Helper constructor that allow to create a set from an array
|
DoubleAVLTreeSet(DoubleCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleAVLTreeSet(DoubleCollection collection,
DoubleComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
DoubleAVLTreeSet(DoubleComparator comp)
Constructor that allows to define the sorter
|
DoubleAVLTreeSet(DoubleIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleAVLTreeSet(DoubleIterator iterator,
DoubleComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleAVLTreeSet(DoubleSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
DoubleAVLTreeSet(java.util.Iterator<java.lang.Double> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
DoubleAVLTreeSet(java.util.Iterator<java.lang.Double> iterator,
DoubleComparator comp)
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
|
double |
ceiling(double e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Double |
ceiling(java.lang.Double e) |
void |
clear() |
DoubleComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(double e)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
DoubleAVLTreeSet |
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.
|
DoubleBidirectionalIterator |
descendingIterator() |
DoubleNavigableSet |
descendingSet() |
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
|
double |
floor(double e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Double |
floor(java.lang.Double e) |
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.
|
double |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
double |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
DoubleNavigableSet |
headSet(double toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
double |
higher(double e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Double |
higher(java.lang.Double e) |
DoubleBidirectionalIterator |
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
|
double |
lower(double e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Double |
lower(java.lang.Double e) |
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 |
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
|
boolean |
remove(double o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
void |
setDefaultMaxValue(double value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(double value)
A Helper method to set the min value for SubSets.
|
int |
size() |
DoubleNavigableSet |
subSet(double fromElement,
boolean fromInclusive,
double toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
DoubleNavigableSet |
tailSet(double fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remDouble, removeAll, removeAll, retainAll, retainAll, toDoubleArray, toDoubleArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringfirst, headSet, headSet, headSet, last, pollFirst, pollLast, spliterator, subSet, subSet, subSet, synchronize, synchronize, tailSet, tailSet, tailSet, unmodifiableaddAll, addAll, 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 DoubleAVLTreeSet()
public DoubleAVLTreeSet(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic DoubleAVLTreeSet(double[] array)
array - the elements that should be usedpublic DoubleAVLTreeSet(double[] array,
int offset,
int length)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic DoubleAVLTreeSet(double[] array,
DoubleComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic DoubleAVLTreeSet(double[] array,
int offset,
int length,
DoubleComparator comp)
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 nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic DoubleAVLTreeSet(DoubleSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public DoubleAVLTreeSet(java.util.Collection<? extends java.lang.Double> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public DoubleAVLTreeSet(java.util.Collection<? extends java.lang.Double> collection,
DoubleComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic DoubleAVLTreeSet(DoubleCollection collection)
collection - the set the elements should be added to the TreeSetpublic DoubleAVLTreeSet(DoubleCollection collection, DoubleComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic DoubleAVLTreeSet(java.util.Iterator<java.lang.Double> iterator)
iterator - the elements that should be added to the setpublic DoubleAVLTreeSet(java.util.Iterator<java.lang.Double> iterator,
DoubleComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic DoubleAVLTreeSet(DoubleIterator iterator)
iterator - the elements that should be added to the setpublic DoubleAVLTreeSet(DoubleIterator iterator, DoubleComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(double value)
DoubleNavigableSetsetDefaultMaxValue in interface DoubleNavigableSetvalue - the new max valuepublic double getDefaultMaxValue()
DoubleNavigableSetgetDefaultMaxValue in interface DoubleNavigableSetpublic void setDefaultMinValue(double value)
DoubleNavigableSetsetDefaultMinValue in interface DoubleNavigableSetvalue - the new min valuepublic double getDefaultMinValue()
DoubleNavigableSetgetDefaultMinValue in interface DoubleNavigableSetpublic boolean add(double o)
DoubleCollectionadd in interface DoubleCollectiono - the element that should be addedpublic double lower(double e)
DoubleNavigableSetlower in interface DoubleNavigableSete - that should be compared with.public double floor(double e)
DoubleNavigableSetfloor in interface DoubleNavigableSete - that should be compared with.public double higher(double e)
DoubleNavigableSethigher in interface DoubleNavigableSete - that should be compared with.public double ceiling(double e)
DoubleNavigableSetceiling in interface DoubleNavigableSete - that should be compared with.public java.lang.Double lower(java.lang.Double e)
lower in interface java.util.NavigableSet<java.lang.Double>lower in interface DoubleNavigableSetpublic java.lang.Double floor(java.lang.Double e)
floor in interface java.util.NavigableSet<java.lang.Double>floor in interface DoubleNavigableSetpublic java.lang.Double higher(java.lang.Double e)
higher in interface java.util.NavigableSet<java.lang.Double>higher in interface DoubleNavigableSetpublic java.lang.Double ceiling(java.lang.Double e)
ceiling in interface java.util.NavigableSet<java.lang.Double>ceiling in interface DoubleNavigableSetpublic 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 findFirst(java.util.function.DoublePredicate filter)
DoubleIterablefindFirst 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 int count(java.util.function.DoublePredicate filter)
DoubleIterablecount in interface DoubleIterablefilter - that should be appliedpublic boolean contains(double e)
AbstractDoubleCollectioncontains in interface DoubleCollectioncontains in class AbstractDoubleCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Double>contains in interface java.util.Set<java.lang.Double>contains in interface DoubleCollectioncontains in interface DoubleSetcontains in class AbstractDoubleCollectionpublic double firstDouble()
DoubleSortedSetfirstDouble in interface DoubleSortedSetpublic double lastDouble()
DoubleSortedSetlastDouble in interface DoubleSortedSetpublic boolean remove(double o)
DoubleSetpublic boolean remove(java.lang.Object o)
AbstractDoubleCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Double>remove in interface java.util.Set<java.lang.Double>remove in interface DoubleCollectionremove in interface DoubleSetremove in class AbstractDoubleCollectionpublic double pollFirstDouble()
DoubleSortedSetpollFirstDouble in interface DoubleSortedSetpublic double pollLastDouble()
DoubleSortedSetpollLastDouble in interface DoubleSortedSetpublic 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 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 DoubleAVLTreeSet copy()
DoubleCollectioncopy in interface DoubleCollectioncopy in interface DoubleNavigableSetcopy in interface DoubleSetcopy in interface DoubleSortedSetcopy in class AbstractDoubleSetpublic DoubleComparator comparator()
DoubleSortedSetcomparator in interface java.util.SortedSet<java.lang.Double>comparator in interface DoubleSortedSetpublic DoubleBidirectionalIterator iterator()
DoubleCollectioniterator in interface java.lang.Iterable<java.lang.Double>iterator in interface java.util.Collection<java.lang.Double>iterator in interface java.util.NavigableSet<java.lang.Double>iterator in interface java.util.Set<java.lang.Double>iterator in interface DoubleCollectioniterator in interface DoubleIterableiterator in interface DoubleNavigableSetiterator in interface DoubleSetiterator in interface DoubleSortedSetiterator in class AbstractDoubleSetCollection.iterator()public DoubleBidirectionalIterator iterator(double fromElement)
DoubleSortedSetiterator in interface DoubleSortedSetfromElement - the element the iterator should start frompublic DoubleBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Double>descendingIterator in interface DoubleNavigableSetpublic DoubleNavigableSet subSet(double fromElement, boolean fromInclusive, double toElement, boolean toInclusive)
DoubleNavigableSetsubSet in interface DoubleNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic DoubleNavigableSet headSet(double toElement, boolean inclusive)
DoubleNavigableSetheadSet in interface DoubleNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic DoubleNavigableSet tailSet(double fromElement, boolean inclusive)
DoubleNavigableSettailSet in interface DoubleNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic DoubleNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Double>descendingSet in interface DoubleNavigableSet