public class Double2ShortRBTreeMap extends AbstractDouble2ShortMap implements Double2ShortNavigableMap
AbstractDouble2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ShortSortedMap.FastSortedSetDouble2ShortMap.BuilderCache, Double2ShortMap.Entry, Double2ShortMap.FastEntrySet, Double2ShortMap.MapBuilder| Constructor and Description |
|---|
Double2ShortRBTreeMap()
Default Constructor
|
Double2ShortRBTreeMap(double[] keys,
short[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2ShortRBTreeMap(java.lang.Double[] keys,
java.lang.Short[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2ShortRBTreeMap(double[] keys,
short[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Double2ShortRBTreeMap(java.lang.Double[] keys,
java.lang.Short[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Double2ShortRBTreeMap(Double2ShortMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2ShortRBTreeMap(Double2ShortMap 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.
|
Double2ShortRBTreeMap(DoubleComparator comp)
Constructor that allows to define the sorter
|
Double2ShortRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2ShortRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> 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 |
|---|---|
short |
addTo(double key,
short value)
A Helper method to add a primitives together.
|
Double2ShortMap.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() |
short |
computeShort(double key,
DoubleShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(double key,
Double2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(double key,
DoubleShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
Double2ShortRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
DoubleNavigableSet |
descendingKeySet() |
Double2ShortNavigableMap |
descendingMap() |
ObjectSet<Double2ShortMap.Entry> |
double2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
Double2ShortMap.Entry |
firstEntry() |
short |
firstShortValue()
A method to get the first Value of a Map.
|
Double2ShortMap.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(DoubleShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
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.
|
short |
getOrDefault(double key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2ShortNavigableMap |
headMap(double toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Double2ShortMap.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.
|
Double2ShortMap.Entry |
lastEntry() |
short |
lastShortValue()
A method to get the last Value of a Map.
|
Double2ShortMap.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 |
mergeAllShort(Double2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(double key,
short value,
ShortShortUnaryOperator 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.
|
Double2ShortMap.Entry |
pollFirstEntry() |
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
Double2ShortMap.Entry |
pollLastEntry() |
short |
put(double key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(double key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(double key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
replace(double key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
short oldValue,
short 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() |
short |
subFrom(double key,
short value)
A Helper method to subtract from primitive from each other.
|
Double2ShortNavigableMap |
subMap(double fromKey,
boolean fromInclusive,
double toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
short |
supplyShortIfAbsent(double key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Double2ShortNavigableMap |
tailMap(double fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ShortCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceShorts, replaceShorts, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, applyAsShort, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceShorts, replaceShorts, setDefaultReturnValuepublic Double2ShortRBTreeMap()
public Double2ShortRBTreeMap(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Double2ShortRBTreeMap(java.lang.Double[] keys,
java.lang.Short[] 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 Double2ShortRBTreeMap(java.lang.Double[] keys,
java.lang.Short[] 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 Double2ShortRBTreeMap(double[] keys,
short[] 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 Double2ShortRBTreeMap(double[] keys,
short[] 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 Double2ShortRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> map)
map - the values that should be present in the mappublic Double2ShortRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Short> 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 Double2ShortRBTreeMap(Double2ShortMap map)
map - the values that should be present in the mappublic Double2ShortRBTreeMap(Double2ShortMap 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)
Double2ShortNavigableMapsetDefaultMaxValue in interface Double2ShortNavigableMapvalue - the new max valuepublic double getDefaultMaxValue()
Double2ShortNavigableMapgetDefaultMaxValue in interface Double2ShortNavigableMappublic void setDefaultMinValue(double value)
Double2ShortNavigableMapsetDefaultMinValue in interface Double2ShortNavigableMapvalue - the new min valuepublic double getDefaultMinValue()
Double2ShortNavigableMapgetDefaultMinValue in interface Double2ShortNavigableMappublic short put(double key,
short value)
Double2ShortMapput in interface Double2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(double key,
short value)
Double2ShortMapputIfAbsent in interface Double2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(double key,
short value)
Double2ShortMapaddTo in interface Double2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(double key,
short value)
Double2ShortMapDouble2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Double2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,java.lang.Short>comparator in interface Double2ShortSortedMappublic boolean containsKey(double key)
Double2ShortMapcontainsKey in interface Double2ShortMapcontainsKey in class AbstractDouble2ShortMapkey - element that is searched forpublic short get(double key)
Double2ShortMapget in interface Double2ShortMapkey - the key that is searched forpublic short getOrDefault(double key,
short defaultValue)
Double2ShortMapgetOrDefault in interface Double2ShortMapgetOrDefault in class AbstractDouble2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double firstDoubleKey()
Double2ShortSortedMapfirstDoubleKey in interface Double2ShortSortedMappublic double pollFirstDoubleKey()
Double2ShortSortedMappollFirstDoubleKey in interface Double2ShortSortedMappublic double lastDoubleKey()
Double2ShortSortedMaplastDoubleKey in interface Double2ShortSortedMappublic double pollLastDoubleKey()
Double2ShortSortedMappollLastDoubleKey in interface Double2ShortSortedMappublic Double2ShortMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>firstEntry in interface Double2ShortNavigableMappublic Double2ShortMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>lastEntry in interface Double2ShortNavigableMappublic Double2ShortMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>pollFirstEntry in interface Double2ShortNavigableMappublic Double2ShortMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>pollLastEntry in interface Double2ShortNavigableMappublic short firstShortValue()
Double2ShortSortedMapfirstShortValue in interface Double2ShortSortedMappublic short lastShortValue()
Double2ShortSortedMaplastShortValue in interface Double2ShortSortedMappublic short remove(double key)
Double2ShortMapremove in interface Double2ShortMapkey - the element that should be removedpublic short removeOrDefault(double key,
short defaultValue)
Double2ShortMapremoveOrDefault in interface Double2ShortMapkey - 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,
short value)
Double2ShortMapremove in interface Double2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
short oldValue,
short newValue)
Double2ShortMapreplace in interface Double2ShortMapreplace in class AbstractDouble2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(double key,
short value)
Double2ShortMapreplace in interface Double2ShortMapreplace in class AbstractDouble2ShortMapkey - the element that should be searched forvalue - the value to replace with.public short computeShort(double key,
DoubleShortUnaryOperator mappingFunction)
Double2ShortMapcomputeShort in interface Double2ShortMapcomputeShort in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(double key,
Double2ShortFunction mappingFunction)
Double2ShortMapcomputeShortIfAbsent in interface Double2ShortMapcomputeShortIfAbsent in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short supplyShortIfAbsent(double key,
ShortSupplier valueProvider)
Double2ShortMapsupplyShortIfAbsent in interface Double2ShortMapsupplyShortIfAbsent in class AbstractDouble2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short computeShortIfPresent(double key,
DoubleShortUnaryOperator mappingFunction)
Double2ShortMapcomputeShortIfPresent in interface Double2ShortMapcomputeShortIfPresent in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(double key,
short value,
ShortShortUnaryOperator mappingFunction)
Double2ShortMapmergeShort in interface Double2ShortMapmergeShort in class AbstractDouble2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Double2ShortMap m, ShortShortUnaryOperator mappingFunction)
Double2ShortMapmergeAllShort in interface Double2ShortMapmergeAllShort in class AbstractDouble2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(DoubleShortConsumer action)
Double2ShortMapforEach in interface Double2ShortMapforEach in class AbstractDouble2ShortMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Short>size in class java.util.AbstractMap<java.lang.Double,java.lang.Short>public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Short>public Double2ShortRBTreeMap copy()
Double2ShortMapcopy in interface Double2ShortMapcopy in interface Double2ShortNavigableMapcopy in interface Double2ShortSortedMapcopy in class AbstractDouble2ShortMappublic DoubleNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Short>keySet in interface java.util.SortedMap<java.lang.Double,java.lang.Short>keySet in interface Double2ShortMapkeySet in interface Double2ShortNavigableMapkeySet in interface Double2ShortSortedMapkeySet in class AbstractDouble2ShortMappublic ObjectSet<Double2ShortMap.Entry> double2ShortEntrySet()
Double2ShortMapdouble2ShortEntrySet in interface Double2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Short>values in interface java.util.SortedMap<java.lang.Double,java.lang.Short>values in interface Double2ShortMapvalues in interface Double2ShortSortedMapvalues in class AbstractDouble2ShortMappublic DoubleNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>navigableKeySet in interface Double2ShortNavigableMappublic Double2ShortNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>descendingMap in interface Double2ShortNavigableMappublic DoubleNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Short>descendingKeySet in interface Double2ShortNavigableMappublic Double2ShortNavigableMap subMap(double fromKey, boolean fromInclusive, double toKey, boolean toInclusive)
Double2ShortNavigableMapsubMap in interface Double2ShortNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Double2ShortNavigableMap headMap(double toKey, boolean inclusive)
Double2ShortNavigableMapheadMap in interface Double2ShortNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Double2ShortNavigableMap tailMap(double fromKey, boolean inclusive)
Double2ShortNavigableMaptailMap in interface Double2ShortNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic double lowerKey(double e)
Double2ShortNavigableMaplowerKey in interface Double2ShortNavigableMape - that should be compared with.public double floorKey(double e)
Double2ShortNavigableMapfloorKey in interface Double2ShortNavigableMape - that should be compared with.public double higherKey(double e)
Double2ShortNavigableMaphigherKey in interface Double2ShortNavigableMape - that should be compared with.public double ceilingKey(double e)
Double2ShortNavigableMapceilingKey in interface Double2ShortNavigableMape - that should be compared with.public Double2ShortMap.Entry lowerEntry(double key)
Double2ShortNavigableMaplowerEntry in interface Double2ShortNavigableMapkey - that should be compared with.public Double2ShortMap.Entry higherEntry(double key)
Double2ShortNavigableMaphigherEntry in interface Double2ShortNavigableMapkey - that should be compared with.public Double2ShortMap.Entry floorEntry(double key)
Double2ShortNavigableMapfloorEntry in interface Double2ShortNavigableMapkey - that should be compared with.public Double2ShortMap.Entry ceilingEntry(double key)
Double2ShortNavigableMapceilingEntry in interface Double2ShortNavigableMapkey - that should be compared with.