public class Double2DoubleAVLTreeMap extends AbstractDouble2DoubleMap implements Double2DoubleNavigableMap
AbstractDouble2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2DoubleSortedMap.FastSortedSetDouble2DoubleMap.FastEntrySet| Constructor and Description |
|---|
Double2DoubleAVLTreeMap()
Default Constructor
|
Double2DoubleAVLTreeMap(double[] keys,
double[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2DoubleAVLTreeMap(java.lang.Double[] keys,
java.lang.Double[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2DoubleAVLTreeMap(double[] keys,
double[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Double2DoubleAVLTreeMap(java.lang.Double[] keys,
java.lang.Double[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Double2DoubleAVLTreeMap(Double2DoubleMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2DoubleAVLTreeMap(Double2DoubleMap map,
DoubleComparator comp)
A Type Specific Helper function that has a custom sorter and allows to create a new Map with exactly the same values as the provided map.
|
Double2DoubleAVLTreeMap(DoubleComparator comp)
Constructor that allows to define the sorter
|
Double2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Double> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Double> map,
DoubleComparator comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(double key,
double value)
A Helper method to add a primitives together.
|
Double2DoubleMap.Entry |
ceilingEntry(double key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
double |
ceilingKey(double e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
DoubleComparator |
comparator() |
double |
computeDouble(double key,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(double key,
Double2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(double key,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
DoubleNavigableSet |
descendingKeySet() |
Double2DoubleNavigableMap |
descendingMap() |
ObjectSet<Double2DoubleMap.Entry> |
double2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
double |
firstDoubleValue()
A method to get the first Value of a Map.
|
Double2DoubleMap.Entry |
firstEntry() |
Double2DoubleMap.Entry |
floorEntry(double key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
double |
floorKey(double e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
double |
getAndMoveToFirst(double key)
A Specific get method that allows to move teh given key/value int the first index.
|
double |
getAndMoveToLast(double key)
A Specific get method that allows to move teh given key/value int the last index.
|
double |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
double |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
double |
getDouble(double key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(double key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2DoubleNavigableMap |
headMap(double toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Double2DoubleMap.Entry |
higherEntry(double key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
double |
higherKey(double e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
DoubleSortedSet |
keySet() |
double |
lastDoubleKey()
A method to get the last Key of a Map.
|
double |
lastDoubleValue()
A method to get the last Value of a Map.
|
Double2DoubleMap.Entry |
lastEntry() |
Double2DoubleMap.Entry |
lowerEntry(double key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
double |
lowerKey(double e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllDouble(Double2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(double key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(double key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(double key)
A specific move method to move a given key/value to the last index.
|
DoubleNavigableSet |
navigableKeySet() |
double |
pollFirstDoubleKey()
A method to get and remove the first Key of a Map.
|
Double2DoubleMap.Entry |
pollFirstEntry() |
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
Double2DoubleMap.Entry |
pollLastEntry() |
double |
put(double key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putAndMoveToFirst(double key,
double value)
A customized put method that allows you to insert into the first index.
|
double |
putAndMoveToLast(double key,
double value)
A customized put method that allows you to insert into the last index.
|
double |
putIfAbsent(double key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remDouble(double key)
Type Specific remove function to reduce boxing/unboxing
|
double |
remDoubleOrDefault(double key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(double key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
replace(double key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(double value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(double value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
Double2DoubleNavigableMap |
subMap(double fromKey,
boolean fromInclusive,
double toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
Double2DoubleNavigableMap |
tailMap(double fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
DoubleCollection |
values() |
addToAll, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceDoubles, replaceDoubles, setDefaultReturnValuecontainsKey, containsValue, isEmpty, put, remove, toStringceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, tailMap, tailMap, tailMapfirstKey, lastKeyaddToAll, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceDoubles, replaceDoubles, setDefaultReturnValueapplyAsDoublepublic Double2DoubleAVLTreeMap()
public Double2DoubleAVLTreeMap(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Double2DoubleAVLTreeMap(java.lang.Double[] keys,
java.lang.Double[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Double2DoubleAVLTreeMap(java.lang.Double[] keys,
java.lang.Double[] values,
DoubleComparator comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Double2DoubleAVLTreeMap(double[] keys,
double[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Double2DoubleAVLTreeMap(double[] keys,
double[] values,
DoubleComparator comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Double2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Double> map)
map - the values that should be present in the mappublic Double2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Double> map,
DoubleComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Double2DoubleAVLTreeMap(Double2DoubleMap map)
map - the values that should be present in the mappublic Double2DoubleAVLTreeMap(Double2DoubleMap map, DoubleComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic void setDefaultMaxValue(double value)
Double2DoubleNavigableMapsetDefaultMaxValue in interface Double2DoubleNavigableMapvalue - the new max valuepublic double getDefaultMaxValue()
Double2DoubleNavigableMapgetDefaultMaxValue in interface Double2DoubleNavigableMappublic void setDefaultMinValue(double value)
Double2DoubleNavigableMapsetDefaultMinValue in interface Double2DoubleNavigableMapvalue - the new min valuepublic double getDefaultMinValue()
Double2DoubleNavigableMapgetDefaultMinValue in interface Double2DoubleNavigableMappublic double put(double key,
double value)
Double2DoubleMapput in interface Double2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(double key,
double value)
Double2DoubleMapputIfAbsent in interface Double2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(double key,
double value)
Double2DoubleMapaddTo in interface Double2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double putAndMoveToFirst(double key,
double value)
Double2DoubleSortedMapputAndMoveToFirst in interface Double2DoubleSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public double putAndMoveToLast(double key,
double value)
Double2DoubleSortedMapputAndMoveToLast in interface Double2DoubleSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(double key)
Double2DoubleSortedMapmoveToFirst in interface Double2DoubleSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(double key)
Double2DoubleSortedMapmoveToLast in interface Double2DoubleSortedMapkey - that should be moved to the first lastpublic double getAndMoveToFirst(double key)
Double2DoubleSortedMapgetAndMoveToFirst in interface Double2DoubleSortedMapkey - that is searched forpublic double getAndMoveToLast(double key)
Double2DoubleSortedMapgetAndMoveToLast in interface Double2DoubleSortedMapkey - that is searched forpublic DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,java.lang.Double>comparator in interface Double2DoubleSortedMappublic boolean containsKey(double key)
Double2DoubleMapcontainsKey in interface Double2DoubleMapcontainsKey in class AbstractDouble2DoubleMapkey - element that is searched forpublic double getDouble(double key)
Double2DoubleMapgetDouble in interface Double2DoubleFunctiongetDouble in interface Double2DoubleMapkey - the key that is searched forpublic double getOrDefault(double key,
double defaultValue)
Double2DoubleMapgetOrDefault in interface Double2DoubleMapgetOrDefault in class AbstractDouble2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double firstDoubleKey()
Double2DoubleSortedMapfirstDoubleKey in interface Double2DoubleSortedMappublic double pollFirstDoubleKey()
Double2DoubleSortedMappollFirstDoubleKey in interface Double2DoubleSortedMappublic double lastDoubleKey()
Double2DoubleSortedMaplastDoubleKey in interface Double2DoubleSortedMappublic double pollLastDoubleKey()
Double2DoubleSortedMappollLastDoubleKey in interface Double2DoubleSortedMappublic Double2DoubleMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>firstEntry in interface Double2DoubleNavigableMappublic Double2DoubleMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>lastEntry in interface Double2DoubleNavigableMappublic Double2DoubleMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>pollFirstEntry in interface Double2DoubleNavigableMappublic Double2DoubleMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>pollLastEntry in interface Double2DoubleNavigableMappublic double firstDoubleValue()
Double2DoubleSortedMapfirstDoubleValue in interface Double2DoubleSortedMappublic double lastDoubleValue()
Double2DoubleSortedMaplastDoubleValue in interface Double2DoubleSortedMappublic double remDouble(double key)
Double2DoubleMapremDouble in interface Double2DoubleMapkey - the element that should be removedpublic double remDoubleOrDefault(double key,
double defaultValue)
Double2DoubleMapremDoubleOrDefault in interface Double2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(double key,
double value)
Double2DoubleMapremove in interface Double2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
double oldValue,
double newValue)
Double2DoubleMapreplace in interface Double2DoubleMapreplace in class AbstractDouble2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(double key,
double value)
Double2DoubleMapreplace in interface Double2DoubleMapreplace in class AbstractDouble2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public double computeDouble(double key,
DoubleDoubleUnaryOperator mappingFunction)
Double2DoubleMapcomputeDouble in interface Double2DoubleMapcomputeDouble in class AbstractDouble2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(double key,
Double2DoubleFunction mappingFunction)
Double2DoubleMapcomputeDoubleIfAbsent in interface Double2DoubleMapcomputeDoubleIfAbsent in class AbstractDouble2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(double key,
DoubleDoubleUnaryOperator mappingFunction)
Double2DoubleMapcomputeDoubleIfPresent in interface Double2DoubleMapcomputeDoubleIfPresent in class AbstractDouble2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(double key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Double2DoubleMapmergeDouble in interface Double2DoubleMapmergeDouble in class AbstractDouble2DoubleMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllDouble(Double2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Double2DoubleMapmergeAllDouble in interface Double2DoubleMapmergeAllDouble in class AbstractDouble2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Double>size in class java.util.AbstractMap<java.lang.Double,java.lang.Double>public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Double>public DoubleSortedSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Double>keySet in interface java.util.SortedMap<java.lang.Double,java.lang.Double>keySet in interface Double2DoubleMapkeySet in interface Double2DoubleSortedMapkeySet in class AbstractDouble2DoubleMappublic ObjectSet<Double2DoubleMap.Entry> double2DoubleEntrySet()
Double2DoubleMapdouble2DoubleEntrySet in interface Double2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Double>values in interface java.util.SortedMap<java.lang.Double,java.lang.Double>values in interface Double2DoubleMapvalues in interface Double2DoubleSortedMapvalues in class AbstractDouble2DoubleMappublic DoubleNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>navigableKeySet in interface Double2DoubleNavigableMappublic Double2DoubleNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>descendingMap in interface Double2DoubleNavigableMappublic DoubleNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Double>descendingKeySet in interface Double2DoubleNavigableMappublic Double2DoubleNavigableMap subMap(double fromKey, boolean fromInclusive, double toKey, boolean toInclusive)
Double2DoubleNavigableMapsubMap in interface Double2DoubleNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Double2DoubleNavigableMap headMap(double toKey, boolean inclusive)
Double2DoubleNavigableMapheadMap in interface Double2DoubleNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Double2DoubleNavigableMap tailMap(double fromKey, boolean inclusive)
Double2DoubleNavigableMaptailMap in interface Double2DoubleNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic double lowerKey(double e)
Double2DoubleNavigableMaplowerKey in interface Double2DoubleNavigableMape - that should be compared with.public double floorKey(double e)
Double2DoubleNavigableMapfloorKey in interface Double2DoubleNavigableMape - that should be compared with.public double higherKey(double e)
Double2DoubleNavigableMaphigherKey in interface Double2DoubleNavigableMape - that should be compared with.public double ceilingKey(double e)
Double2DoubleNavigableMapceilingKey in interface Double2DoubleNavigableMape - that should be compared with.public Double2DoubleMap.Entry lowerEntry(double key)
Double2DoubleNavigableMaplowerEntry in interface Double2DoubleNavigableMapkey - that should be compared with.public Double2DoubleMap.Entry higherEntry(double key)
Double2DoubleNavigableMaphigherEntry in interface Double2DoubleNavigableMapkey - that should be compared with.public Double2DoubleMap.Entry floorEntry(double key)
Double2DoubleNavigableMapfloorEntry in interface Double2DoubleNavigableMapkey - that should be compared with.public Double2DoubleMap.Entry ceilingEntry(double key)
Double2DoubleNavigableMapceilingEntry in interface Double2DoubleNavigableMapkey - that should be compared with.