public class Double2IntAVLTreeMap extends AbstractDouble2IntMap implements Double2IntNavigableMap
AbstractDouble2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2IntSortedMap.FastSortedSetDouble2IntMap.BuilderCache, Double2IntMap.Entry, Double2IntMap.FastEntrySet, Double2IntMap.MapBuilder| Constructor and Description |
|---|
Double2IntAVLTreeMap()
Default Constructor
|
Double2IntAVLTreeMap(double[] keys,
int[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2IntAVLTreeMap(double[] keys,
int[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Double2IntAVLTreeMap(java.lang.Double[] keys,
java.lang.Integer[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2IntAVLTreeMap(java.lang.Double[] keys,
java.lang.Integer[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Double2IntAVLTreeMap(Double2IntMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2IntAVLTreeMap(Double2IntMap 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.
|
Double2IntAVLTreeMap(DoubleComparator comp)
Constructor that allows to define the sorter
|
Double2IntAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2IntAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> 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 |
|---|---|
int |
addTo(double key,
int value)
A Helper method to add a primitives together.
|
Double2IntMap.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() |
int |
computeInt(double key,
DoubleIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(double key,
Double2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(double key,
DoubleIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
Double2IntAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
DoubleNavigableSet |
descendingKeySet() |
Double2IntNavigableMap |
descendingMap() |
ObjectSet<Double2IntMap.Entry> |
double2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
Double2IntMap.Entry |
firstEntry() |
int |
firstIntValue()
A method to get the first Value of a Map.
|
Double2IntMap.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.
|
void |
forEach(DoubleIntConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
int |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
double |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
int |
getOrDefault(double key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2IntNavigableMap |
headMap(double toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Double2IntMap.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.
|
DoubleNavigableSet |
keySet() |
double |
lastDoubleKey()
A method to get the last Key of a Map.
|
Double2IntMap.Entry |
lastEntry() |
int |
lastIntValue()
A method to get the last Value of a Map.
|
Double2IntMap.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 |
mergeAllInt(Double2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(double key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
DoubleNavigableSet |
navigableKeySet() |
double |
pollFirstDoubleKey()
A method to get and remove the first Key of a Map.
|
Double2IntMap.Entry |
pollFirstEntry() |
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
Double2IntMap.Entry |
pollLastEntry() |
int |
put(double key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(double key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(double key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
replace(double key,
int value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
int oldValue,
int 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() |
int |
subFrom(double key,
int value)
A Helper method to subtract from primitive from each other.
|
Double2IntNavigableMap |
subMap(double fromKey,
boolean fromInclusive,
double toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
int |
supplyIntIfAbsent(double key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Double2IntNavigableMap |
tailMap(double fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
IntCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceInts, replaceInts, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceInts, replaceInts, setDefaultReturnValueapplyAsIntpublic Double2IntAVLTreeMap()
public Double2IntAVLTreeMap(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Double2IntAVLTreeMap(java.lang.Double[] keys,
java.lang.Integer[] 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 Double2IntAVLTreeMap(java.lang.Double[] keys,
java.lang.Integer[] 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 Double2IntAVLTreeMap(double[] keys,
int[] 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 Double2IntAVLTreeMap(double[] keys,
int[] 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 Double2IntAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> map)
map - the values that should be present in the mappublic Double2IntAVLTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Integer> 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 Double2IntAVLTreeMap(Double2IntMap map)
map - the values that should be present in the mappublic Double2IntAVLTreeMap(Double2IntMap 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)
Double2IntNavigableMapsetDefaultMaxValue in interface Double2IntNavigableMapvalue - the new max valuepublic double getDefaultMaxValue()
Double2IntNavigableMapgetDefaultMaxValue in interface Double2IntNavigableMappublic void setDefaultMinValue(double value)
Double2IntNavigableMapsetDefaultMinValue in interface Double2IntNavigableMapvalue - the new min valuepublic double getDefaultMinValue()
Double2IntNavigableMapgetDefaultMinValue in interface Double2IntNavigableMappublic int put(double key,
int value)
Double2IntMapput in interface Double2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(double key,
int value)
Double2IntMapputIfAbsent in interface Double2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(double key,
int value)
Double2IntMapaddTo in interface Double2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(double key,
int value)
Double2IntMapDouble2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Double2IntMapkey - that should be subtract fromvalue - that should be subtractpublic DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,java.lang.Integer>comparator in interface Double2IntSortedMappublic boolean containsKey(double key)
Double2IntMapcontainsKey in interface Double2IntMapcontainsKey in class AbstractDouble2IntMapkey - element that is searched forpublic int get(double key)
Double2IntMapget in interface Double2IntFunctionget in interface Double2IntMapkey - the key that is searched forpublic int getOrDefault(double key,
int defaultValue)
Double2IntMapgetOrDefault in interface Double2IntMapgetOrDefault in class AbstractDouble2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double firstDoubleKey()
Double2IntSortedMapfirstDoubleKey in interface Double2IntSortedMappublic double pollFirstDoubleKey()
Double2IntSortedMappollFirstDoubleKey in interface Double2IntSortedMappublic double lastDoubleKey()
Double2IntSortedMaplastDoubleKey in interface Double2IntSortedMappublic double pollLastDoubleKey()
Double2IntSortedMappollLastDoubleKey in interface Double2IntSortedMappublic Double2IntMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>firstEntry in interface Double2IntNavigableMappublic Double2IntMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>lastEntry in interface Double2IntNavigableMappublic Double2IntMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>pollFirstEntry in interface Double2IntNavigableMappublic Double2IntMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>pollLastEntry in interface Double2IntNavigableMappublic int firstIntValue()
Double2IntSortedMapfirstIntValue in interface Double2IntSortedMappublic int lastIntValue()
Double2IntSortedMaplastIntValue in interface Double2IntSortedMappublic int remove(double key)
Double2IntMapremove in interface Double2IntMapkey - the element that should be removedpublic int removeOrDefault(double key,
int defaultValue)
Double2IntMapremoveOrDefault in interface Double2IntMapkey - 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,
int value)
Double2IntMapremove in interface Double2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
int oldValue,
int newValue)
Double2IntMapreplace in interface Double2IntMapreplace in class AbstractDouble2IntMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public int replace(double key,
int value)
Double2IntMapreplace in interface Double2IntMapreplace in class AbstractDouble2IntMapkey - the element that should be searched forvalue - the value to replace with.public int computeInt(double key,
DoubleIntUnaryOperator mappingFunction)
Double2IntMapcomputeInt in interface Double2IntMapcomputeInt in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(double key,
Double2IntFunction mappingFunction)
Double2IntMapcomputeIntIfAbsent in interface Double2IntMapcomputeIntIfAbsent in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int supplyIntIfAbsent(double key,
IntSupplier valueProvider)
Double2IntMapsupplyIntIfAbsent in interface Double2IntMapsupplyIntIfAbsent in class AbstractDouble2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int computeIntIfPresent(double key,
DoubleIntUnaryOperator mappingFunction)
Double2IntMapcomputeIntIfPresent in interface Double2IntMapcomputeIntIfPresent in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int mergeInt(double key,
int value,
IntIntUnaryOperator mappingFunction)
Double2IntMapmergeInt in interface Double2IntMapmergeInt in class AbstractDouble2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Double2IntMap m, IntIntUnaryOperator mappingFunction)
Double2IntMapmergeAllInt in interface Double2IntMapmergeAllInt in class AbstractDouble2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(DoubleIntConsumer action)
Double2IntMapforEach in interface Double2IntMapforEach in class AbstractDouble2IntMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Integer>size in class java.util.AbstractMap<java.lang.Double,java.lang.Integer>public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Integer>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Integer>public Double2IntAVLTreeMap copy()
Double2IntMapcopy in interface Double2IntMapcopy in interface Double2IntNavigableMapcopy in interface Double2IntSortedMapcopy in class AbstractDouble2IntMappublic DoubleNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Integer>keySet in interface java.util.SortedMap<java.lang.Double,java.lang.Integer>keySet in interface Double2IntMapkeySet in interface Double2IntNavigableMapkeySet in interface Double2IntSortedMapkeySet in class AbstractDouble2IntMappublic ObjectSet<Double2IntMap.Entry> double2IntEntrySet()
Double2IntMapdouble2IntEntrySet in interface Double2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Integer>values in interface java.util.SortedMap<java.lang.Double,java.lang.Integer>values in interface Double2IntMapvalues in interface Double2IntSortedMapvalues in class AbstractDouble2IntMappublic DoubleNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>navigableKeySet in interface Double2IntNavigableMappublic Double2IntNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>descendingMap in interface Double2IntNavigableMappublic DoubleNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Integer>descendingKeySet in interface Double2IntNavigableMappublic Double2IntNavigableMap subMap(double fromKey, boolean fromInclusive, double toKey, boolean toInclusive)
Double2IntNavigableMapsubMap in interface Double2IntNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Double2IntNavigableMap headMap(double toKey, boolean inclusive)
Double2IntNavigableMapheadMap in interface Double2IntNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Double2IntNavigableMap tailMap(double fromKey, boolean inclusive)
Double2IntNavigableMaptailMap in interface Double2IntNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic double lowerKey(double e)
Double2IntNavigableMaplowerKey in interface Double2IntNavigableMape - that should be compared with.public double floorKey(double e)
Double2IntNavigableMapfloorKey in interface Double2IntNavigableMape - that should be compared with.public double higherKey(double e)
Double2IntNavigableMaphigherKey in interface Double2IntNavigableMape - that should be compared with.public double ceilingKey(double e)
Double2IntNavigableMapceilingKey in interface Double2IntNavigableMape - that should be compared with.public Double2IntMap.Entry lowerEntry(double key)
Double2IntNavigableMaplowerEntry in interface Double2IntNavigableMapkey - that should be compared with.public Double2IntMap.Entry higherEntry(double key)
Double2IntNavigableMaphigherEntry in interface Double2IntNavigableMapkey - that should be compared with.public Double2IntMap.Entry floorEntry(double key)
Double2IntNavigableMapfloorEntry in interface Double2IntNavigableMapkey - that should be compared with.public Double2IntMap.Entry ceilingEntry(double key)
Double2IntNavigableMapceilingEntry in interface Double2IntNavigableMapkey - that should be compared with.