public class Int2DoubleRBTreeMap extends AbstractInt2DoubleMap implements Int2DoubleNavigableMap
AbstractInt2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2DoubleSortedMap.FastSortedSetInt2DoubleMap.FastEntrySet| Constructor and Description |
|---|
Int2DoubleRBTreeMap()
Default Constructor
|
Int2DoubleRBTreeMap(int[] keys,
double[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2DoubleRBTreeMap(int[] keys,
double[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Int2DoubleRBTreeMap(Int2DoubleMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2DoubleRBTreeMap(Int2DoubleMap map,
IntComparator 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.
|
Int2DoubleRBTreeMap(IntComparator comp)
Constructor that allows to define the sorter
|
Int2DoubleRBTreeMap(java.lang.Integer[] keys,
java.lang.Double[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2DoubleRBTreeMap(java.lang.Integer[] keys,
java.lang.Double[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Int2DoubleRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2DoubleRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
IntComparator 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(int key,
double value)
A Helper method to add a primitives together.
|
Int2DoubleMap.Entry |
ceilingEntry(int key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
int |
ceilingKey(int e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
IntComparator |
comparator() |
double |
computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
IntNavigableSet |
descendingKeySet() |
Int2DoubleNavigableMap |
descendingMap() |
double |
firstDoubleValue()
A method to get the first Value of a Map.
|
Int2DoubleMap.Entry |
firstEntry() |
int |
firstIntKey()
A method to get the first Key of a Map.
|
Int2DoubleMap.Entry |
floorEntry(int key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
int |
floorKey(int e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
double |
getAndMoveToFirst(int key)
A Specific get method that allows to move teh given key/value int the first index.
|
double |
getAndMoveToLast(int key)
A Specific get method that allows to move teh given key/value int the last index.
|
int |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
int |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
double |
getDouble(int key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(int key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Int2DoubleNavigableMap |
headMap(int toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Int2DoubleMap.Entry |
higherEntry(int key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
int |
higherKey(int e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ObjectSet<Int2DoubleMap.Entry> |
int2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSortedSet |
keySet() |
double |
lastDoubleValue()
A method to get the last Value of a Map.
|
Int2DoubleMap.Entry |
lastEntry() |
int |
lastIntKey()
A method to get the last Key of a Map.
|
Int2DoubleMap.Entry |
lowerEntry(int key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
int |
lowerKey(int e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllDouble(Int2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(int key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(int key)
A specific move method to move a given key/value to the last index.
|
IntNavigableSet |
navigableKeySet() |
Int2DoubleMap.Entry |
pollFirstEntry() |
int |
pollFirstIntKey()
A method to get and remove the first Key of a Map.
|
Int2DoubleMap.Entry |
pollLastEntry() |
int |
pollLastIntKey()
A method to get and remove the last Key of a Map.
|
double |
put(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putAndMoveToFirst(int key,
double value)
A customized put method that allows you to insert into the first index.
|
double |
putAndMoveToLast(int key,
double value)
A customized put method that allows you to insert into the last index.
|
double |
putIfAbsent(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remInt(int key)
Type Specific remove function to reduce boxing/unboxing
|
double |
remIntOrDefault(int key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(int key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
replace(int key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(int value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(int value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
Int2DoubleNavigableMap |
subMap(int fromKey,
boolean fromInclusive,
int toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
Int2DoubleNavigableMap |
tailMap(int 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 Int2DoubleRBTreeMap()
public Int2DoubleRBTreeMap(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Int2DoubleRBTreeMap(java.lang.Integer[] 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 Int2DoubleRBTreeMap(java.lang.Integer[] keys,
java.lang.Double[] values,
IntComparator 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 Int2DoubleRBTreeMap(int[] 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 Int2DoubleRBTreeMap(int[] keys,
double[] values,
IntComparator 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 Int2DoubleRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map)
map - the values that should be present in the mappublic Int2DoubleRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
IntComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Int2DoubleRBTreeMap(Int2DoubleMap map)
map - the values that should be present in the mappublic Int2DoubleRBTreeMap(Int2DoubleMap map, IntComparator 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(int value)
Int2DoubleNavigableMapsetDefaultMaxValue in interface Int2DoubleNavigableMapvalue - the new max valuepublic int getDefaultMaxValue()
Int2DoubleNavigableMapgetDefaultMaxValue in interface Int2DoubleNavigableMappublic void setDefaultMinValue(int value)
Int2DoubleNavigableMapsetDefaultMinValue in interface Int2DoubleNavigableMapvalue - the new min valuepublic int getDefaultMinValue()
Int2DoubleNavigableMapgetDefaultMinValue in interface Int2DoubleNavigableMappublic double put(int key,
double value)
Int2DoubleMapput in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(int key,
double value)
Int2DoubleMapputIfAbsent in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(int key,
double value)
Int2DoubleMapaddTo in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double putAndMoveToFirst(int key,
double value)
Int2DoubleSortedMapputAndMoveToFirst in interface Int2DoubleSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public double putAndMoveToLast(int key,
double value)
Int2DoubleSortedMapputAndMoveToLast in interface Int2DoubleSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(int key)
Int2DoubleSortedMapmoveToFirst in interface Int2DoubleSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(int key)
Int2DoubleSortedMapmoveToLast in interface Int2DoubleSortedMapkey - that should be moved to the first lastpublic double getAndMoveToFirst(int key)
Int2DoubleSortedMapgetAndMoveToFirst in interface Int2DoubleSortedMapkey - that is searched forpublic double getAndMoveToLast(int key)
Int2DoubleSortedMapgetAndMoveToLast in interface Int2DoubleSortedMapkey - that is searched forpublic IntComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Integer,java.lang.Double>comparator in interface Int2DoubleSortedMappublic boolean containsKey(int key)
Int2DoubleMapcontainsKey in interface Int2DoubleMapcontainsKey in class AbstractInt2DoubleMapkey - element that is searched forpublic double getDouble(int key)
Int2DoubleMapgetDouble in interface Int2DoubleFunctiongetDouble in interface Int2DoubleMapkey - the key that is searched forpublic double getOrDefault(int key,
double defaultValue)
Int2DoubleMapgetOrDefault in interface Int2DoubleMapgetOrDefault in class AbstractInt2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int firstIntKey()
Int2DoubleSortedMapfirstIntKey in interface Int2DoubleSortedMappublic int pollFirstIntKey()
Int2DoubleSortedMappollFirstIntKey in interface Int2DoubleSortedMappublic int lastIntKey()
Int2DoubleSortedMaplastIntKey in interface Int2DoubleSortedMappublic int pollLastIntKey()
Int2DoubleSortedMappollLastIntKey in interface Int2DoubleSortedMappublic Int2DoubleMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>firstEntry in interface Int2DoubleNavigableMappublic Int2DoubleMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>lastEntry in interface Int2DoubleNavigableMappublic Int2DoubleMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>pollFirstEntry in interface Int2DoubleNavigableMappublic Int2DoubleMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>pollLastEntry in interface Int2DoubleNavigableMappublic double firstDoubleValue()
Int2DoubleSortedMapfirstDoubleValue in interface Int2DoubleSortedMappublic double lastDoubleValue()
Int2DoubleSortedMaplastDoubleValue in interface Int2DoubleSortedMappublic double remInt(int key)
Int2DoubleMapremInt in interface Int2DoubleMapkey - the element that should be removedpublic double remIntOrDefault(int key,
double defaultValue)
Int2DoubleMapremIntOrDefault in interface Int2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
double value)
Int2DoubleMapremove in interface Int2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
double oldValue,
double newValue)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(int key,
double value)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public double computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDouble in interface Int2DoubleMapcomputeDouble in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
Int2DoubleMapcomputeDoubleIfAbsent in interface Int2DoubleMapcomputeDoubleIfAbsent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDoubleIfPresent in interface Int2DoubleMapcomputeDoubleIfPresent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeDouble in interface Int2DoubleMapmergeDouble in class AbstractInt2DoubleMapkey - 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(Int2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeAllDouble in interface Int2DoubleMapmergeAllDouble in class AbstractInt2DoubleMapm - 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.Integer,java.lang.Double>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public IntSortedSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Double>keySet in interface java.util.SortedMap<java.lang.Integer,java.lang.Double>keySet in interface Int2DoubleMapkeySet in interface Int2DoubleSortedMapkeySet in class AbstractInt2DoubleMappublic ObjectSet<Int2DoubleMap.Entry> int2DoubleEntrySet()
Int2DoubleMapint2DoubleEntrySet in interface Int2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Double>values in interface java.util.SortedMap<java.lang.Integer,java.lang.Double>values in interface Int2DoubleMapvalues in interface Int2DoubleSortedMapvalues in class AbstractInt2DoubleMappublic IntNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>navigableKeySet in interface Int2DoubleNavigableMappublic Int2DoubleNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>descendingMap in interface Int2DoubleNavigableMappublic IntNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Double>descendingKeySet in interface Int2DoubleNavigableMappublic Int2DoubleNavigableMap subMap(int fromKey, boolean fromInclusive, int toKey, boolean toInclusive)
Int2DoubleNavigableMapsubMap in interface Int2DoubleNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Int2DoubleNavigableMap headMap(int toKey, boolean inclusive)
Int2DoubleNavigableMapheadMap in interface Int2DoubleNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Int2DoubleNavigableMap tailMap(int fromKey, boolean inclusive)
Int2DoubleNavigableMaptailMap in interface Int2DoubleNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic int lowerKey(int e)
Int2DoubleNavigableMaplowerKey in interface Int2DoubleNavigableMape - that should be compared with.public int floorKey(int e)
Int2DoubleNavigableMapfloorKey in interface Int2DoubleNavigableMape - that should be compared with.public int higherKey(int e)
Int2DoubleNavigableMaphigherKey in interface Int2DoubleNavigableMape - that should be compared with.public int ceilingKey(int e)
Int2DoubleNavigableMapceilingKey in interface Int2DoubleNavigableMape - that should be compared with.public Int2DoubleMap.Entry lowerEntry(int key)
Int2DoubleNavigableMaplowerEntry in interface Int2DoubleNavigableMapkey - that should be compared with.public Int2DoubleMap.Entry higherEntry(int key)
Int2DoubleNavigableMaphigherEntry in interface Int2DoubleNavigableMapkey - that should be compared with.public Int2DoubleMap.Entry floorEntry(int key)
Int2DoubleNavigableMapfloorEntry in interface Int2DoubleNavigableMapkey - that should be compared with.public Int2DoubleMap.Entry ceilingEntry(int key)
Int2DoubleNavigableMapceilingEntry in interface Int2DoubleNavigableMapkey - that should be compared with.