public class Double2LongRBTreeMap extends AbstractDouble2LongMap implements Double2LongNavigableMap
AbstractDouble2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2LongSortedMap.FastSortedSetDouble2LongMap.BuilderCache, Double2LongMap.Entry, Double2LongMap.FastEntrySet, Double2LongMap.MapBuilder| Constructor and Description |
|---|
Double2LongRBTreeMap()
Default Constructor
|
Double2LongRBTreeMap(double[] keys,
long[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2LongRBTreeMap(java.lang.Double[] keys,
java.lang.Long[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2LongRBTreeMap(double[] keys,
long[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Double2LongRBTreeMap(java.lang.Double[] keys,
java.lang.Long[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Double2LongRBTreeMap(Double2LongMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2LongRBTreeMap(Double2LongMap 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.
|
Double2LongRBTreeMap(DoubleComparator comp)
Constructor that allows to define the sorter
|
Double2LongRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2LongRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> 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 |
|---|---|
long |
addTo(double key,
long value)
A Helper method to add a primitives together.
|
Double2LongMap.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() |
long |
computeLong(double key,
DoubleLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(double key,
Double2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(double key,
DoubleLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
Double2LongRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
DoubleNavigableSet |
descendingKeySet() |
Double2LongNavigableMap |
descendingMap() |
ObjectSet<Double2LongMap.Entry> |
double2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
Double2LongMap.Entry |
firstEntry() |
long |
firstLongValue()
A method to get the first Value of a Map.
|
Double2LongMap.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(DoubleLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
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.
|
long |
getOrDefault(double key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2LongNavigableMap |
headMap(double toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Double2LongMap.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.
|
Double2LongMap.Entry |
lastEntry() |
long |
lastLongValue()
A method to get the last Value of a Map.
|
Double2LongMap.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 |
mergeAllLong(Double2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(double key,
long value,
LongLongUnaryOperator 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.
|
Double2LongMap.Entry |
pollFirstEntry() |
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
Double2LongMap.Entry |
pollLastEntry() |
long |
put(double key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(double key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(double key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
replace(double key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
long oldValue,
long 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() |
long |
subFrom(double key,
long value)
A Helper method to subtract from primitive from each other.
|
Double2LongNavigableMap |
subMap(double fromKey,
boolean fromInclusive,
double toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
long |
supplyLongIfAbsent(double key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Double2LongNavigableMap |
tailMap(double fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
LongCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceLongs, replaceLongs, 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, replaceLongs, replaceLongs, setDefaultReturnValueapplyAsLongpublic Double2LongRBTreeMap()
public Double2LongRBTreeMap(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Double2LongRBTreeMap(java.lang.Double[] keys,
java.lang.Long[] 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 Double2LongRBTreeMap(java.lang.Double[] keys,
java.lang.Long[] 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 Double2LongRBTreeMap(double[] keys,
long[] 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 Double2LongRBTreeMap(double[] keys,
long[] 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 Double2LongRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> map)
map - the values that should be present in the mappublic Double2LongRBTreeMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> 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 Double2LongRBTreeMap(Double2LongMap map)
map - the values that should be present in the mappublic Double2LongRBTreeMap(Double2LongMap 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)
Double2LongNavigableMapsetDefaultMaxValue in interface Double2LongNavigableMapvalue - the new max valuepublic double getDefaultMaxValue()
Double2LongNavigableMapgetDefaultMaxValue in interface Double2LongNavigableMappublic void setDefaultMinValue(double value)
Double2LongNavigableMapsetDefaultMinValue in interface Double2LongNavigableMapvalue - the new min valuepublic double getDefaultMinValue()
Double2LongNavigableMapgetDefaultMinValue in interface Double2LongNavigableMappublic long put(double key,
long value)
Double2LongMapput in interface Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(double key,
long value)
Double2LongMapputIfAbsent in interface Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(double key,
long value)
Double2LongMapaddTo in interface Double2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(double key,
long value)
Double2LongMapDouble2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Double2LongMapkey - that should be subtract fromvalue - that should be subtractpublic DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,java.lang.Long>comparator in interface Double2LongSortedMappublic boolean containsKey(double key)
Double2LongMapcontainsKey in interface Double2LongMapcontainsKey in class AbstractDouble2LongMapkey - element that is searched forpublic long get(double key)
Double2LongMapget in interface Double2LongFunctionget in interface Double2LongMapkey - the key that is searched forpublic long getOrDefault(double key,
long defaultValue)
Double2LongMapgetOrDefault in interface Double2LongMapgetOrDefault in class AbstractDouble2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double firstDoubleKey()
Double2LongSortedMapfirstDoubleKey in interface Double2LongSortedMappublic double pollFirstDoubleKey()
Double2LongSortedMappollFirstDoubleKey in interface Double2LongSortedMappublic double lastDoubleKey()
Double2LongSortedMaplastDoubleKey in interface Double2LongSortedMappublic double pollLastDoubleKey()
Double2LongSortedMappollLastDoubleKey in interface Double2LongSortedMappublic Double2LongMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>firstEntry in interface Double2LongNavigableMappublic Double2LongMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>lastEntry in interface Double2LongNavigableMappublic Double2LongMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>pollFirstEntry in interface Double2LongNavigableMappublic Double2LongMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>pollLastEntry in interface Double2LongNavigableMappublic long firstLongValue()
Double2LongSortedMapfirstLongValue in interface Double2LongSortedMappublic long lastLongValue()
Double2LongSortedMaplastLongValue in interface Double2LongSortedMappublic long remove(double key)
Double2LongMapremove in interface Double2LongMapkey - the element that should be removedpublic long removeOrDefault(double key,
long defaultValue)
Double2LongMapremoveOrDefault in interface Double2LongMapkey - 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,
long value)
Double2LongMapremove in interface Double2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
long oldValue,
long newValue)
Double2LongMapreplace in interface Double2LongMapreplace in class AbstractDouble2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(double key,
long value)
Double2LongMapreplace in interface Double2LongMapreplace in class AbstractDouble2LongMapkey - the element that should be searched forvalue - the value to replace with.public long computeLong(double key,
DoubleLongUnaryOperator mappingFunction)
Double2LongMapcomputeLong in interface Double2LongMapcomputeLong in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(double key,
Double2LongFunction mappingFunction)
Double2LongMapcomputeLongIfAbsent in interface Double2LongMapcomputeLongIfAbsent in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long supplyLongIfAbsent(double key,
LongSupplier valueProvider)
Double2LongMapsupplyLongIfAbsent in interface Double2LongMapsupplyLongIfAbsent in class AbstractDouble2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long computeLongIfPresent(double key,
DoubleLongUnaryOperator mappingFunction)
Double2LongMapcomputeLongIfPresent in interface Double2LongMapcomputeLongIfPresent in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(double key,
long value,
LongLongUnaryOperator mappingFunction)
Double2LongMapmergeLong in interface Double2LongMapmergeLong in class AbstractDouble2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Double2LongMap m, LongLongUnaryOperator mappingFunction)
Double2LongMapmergeAllLong in interface Double2LongMapmergeAllLong in class AbstractDouble2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(DoubleLongConsumer action)
Double2LongMapforEach in interface Double2LongMapforEach in class AbstractDouble2LongMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Long>size in class java.util.AbstractMap<java.lang.Double,java.lang.Long>public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Long>public Double2LongRBTreeMap copy()
Double2LongMapcopy in interface Double2LongMapcopy in interface Double2LongNavigableMapcopy in interface Double2LongSortedMapcopy in class AbstractDouble2LongMappublic DoubleNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Long>keySet in interface java.util.SortedMap<java.lang.Double,java.lang.Long>keySet in interface Double2LongMapkeySet in interface Double2LongNavigableMapkeySet in interface Double2LongSortedMapkeySet in class AbstractDouble2LongMappublic ObjectSet<Double2LongMap.Entry> double2LongEntrySet()
Double2LongMapdouble2LongEntrySet in interface Double2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Long>values in interface java.util.SortedMap<java.lang.Double,java.lang.Long>values in interface Double2LongMapvalues in interface Double2LongSortedMapvalues in class AbstractDouble2LongMappublic DoubleNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>navigableKeySet in interface Double2LongNavigableMappublic Double2LongNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>descendingMap in interface Double2LongNavigableMappublic DoubleNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Double,java.lang.Long>descendingKeySet in interface Double2LongNavigableMappublic Double2LongNavigableMap subMap(double fromKey, boolean fromInclusive, double toKey, boolean toInclusive)
Double2LongNavigableMapsubMap in interface Double2LongNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Double2LongNavigableMap headMap(double toKey, boolean inclusive)
Double2LongNavigableMapheadMap in interface Double2LongNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Double2LongNavigableMap tailMap(double fromKey, boolean inclusive)
Double2LongNavigableMaptailMap in interface Double2LongNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic double lowerKey(double e)
Double2LongNavigableMaplowerKey in interface Double2LongNavigableMape - that should be compared with.public double floorKey(double e)
Double2LongNavigableMapfloorKey in interface Double2LongNavigableMape - that should be compared with.public double higherKey(double e)
Double2LongNavigableMaphigherKey in interface Double2LongNavigableMape - that should be compared with.public double ceilingKey(double e)
Double2LongNavigableMapceilingKey in interface Double2LongNavigableMape - that should be compared with.public Double2LongMap.Entry lowerEntry(double key)
Double2LongNavigableMaplowerEntry in interface Double2LongNavigableMapkey - that should be compared with.public Double2LongMap.Entry higherEntry(double key)
Double2LongNavigableMaphigherEntry in interface Double2LongNavigableMapkey - that should be compared with.public Double2LongMap.Entry floorEntry(double key)
Double2LongNavigableMapfloorEntry in interface Double2LongNavigableMapkey - that should be compared with.public Double2LongMap.Entry ceilingEntry(double key)
Double2LongNavigableMapceilingEntry in interface Double2LongNavigableMapkey - that should be compared with.