public class DoubleAVLTreeSet extends AbstractDoubleSet implements DoubleNavigableSet
| 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
|
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.
|
double |
ceiling(double e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
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.
|
DoubleBidirectionalIterator |
descendingIterator() |
DoubleNavigableSet |
descendingSet() |
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.
|
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.
|
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.
|
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
|
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, containsAny, containsAny, remDouble, removeAll, retainAll, toDoubleArray, toDoubleArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringceiling, first, floor, headSet, headSet, headSet, higher, last, lower, pollFirst, pollLast, spliterator, subSet, subSet, subSet, tailSet, tailSet, tailSetaddAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toDoubleArray, toDoubleArrayforEach, forEachpublic 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 boolean addAndMoveToFirst(double o)
DoubleSortedSetaddAndMoveToFirst in interface DoubleSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(double o)
DoubleSortedSetaddAndMoveToLast in interface DoubleSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(double o)
DoubleSortedSetmoveToFirst in interface DoubleSortedSeto - that should be moved to the first indexpublic boolean moveToLast(double o)
DoubleSortedSetmoveToLast in interface DoubleSortedSeto - that should be moved to the first lastpublic 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 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 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 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