V - the type of elements maintained by this Collectionpublic class Double2ObjectRBTreeMap<V> extends AbstractDouble2ObjectMap<V> implements Double2ObjectNavigableMap<V>
AbstractDouble2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ObjectSortedMap.FastSortedSet<V>Double2ObjectMap.BuilderCache<V>, Double2ObjectMap.Entry<V>, Double2ObjectMap.FastEntrySet<V>, Double2ObjectMap.MapBuilder| Constructor and Description |
|---|
Double2ObjectRBTreeMap()
Default Constructor
|
Double2ObjectRBTreeMap(double[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2ObjectRBTreeMap(java.lang.Double[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2ObjectRBTreeMap(double[] keys,
V[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Double2ObjectRBTreeMap(java.lang.Double[] keys,
V[] values,
DoubleComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Double2ObjectRBTreeMap(Double2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2ObjectRBTreeMap(Double2ObjectMap<V> 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.
|
Double2ObjectRBTreeMap(DoubleComparator comp)
Constructor that allows to define the sorter
|
Double2ObjectRBTreeMap(java.util.Map<? extends java.lang.Double,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2ObjectRBTreeMap(java.util.Map<? extends java.lang.Double,? extends V> 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 |
|---|---|
Double2ObjectMap.Entry<V> |
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() |
V |
compute(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(double key,
Double2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
Double2ObjectRBTreeMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
DoubleNavigableSet |
descendingKeySet() |
Double2ObjectNavigableMap<V> |
descendingMap() |
ObjectSet<Double2ObjectMap.Entry<V>> |
double2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
Double2ObjectMap.Entry<V> |
firstEntry() |
V |
firstValue()
A method to get the first Value of a Map.
|
Double2ObjectMap.Entry<V> |
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(DoubleObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
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.
|
V |
getOrDefault(double key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2ObjectNavigableMap<V> |
headMap(double toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Double2ObjectMap.Entry<V> |
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.
|
Double2ObjectMap.Entry<V> |
lastEntry() |
V |
lastValue()
A method to get the last Value of a Map.
|
Double2ObjectMap.Entry<V> |
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.
|
V |
merge(double key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Double2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
DoubleNavigableSet |
navigableKeySet() |
double |
pollFirstDoubleKey()
A method to get and remove the first Key of a Map.
|
Double2ObjectMap.Entry<V> |
pollFirstEntry() |
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
Double2ObjectMap.Entry<V> |
pollLastEntry() |
V |
put(double key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(double key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(double key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(double key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
V oldValue,
V 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() |
Double2ObjectNavigableMap<V> |
subMap(double fromKey,
boolean fromInclusive,
double toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
V |
supplyIfAbsent(double key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Double2ObjectNavigableMap<V> |
tailMap(double fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ObjectCollection<V> |
values() |
containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceObjects, replaceObjects, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeybuilder, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValueapplypublic Double2ObjectRBTreeMap()
public Double2ObjectRBTreeMap(DoubleComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Double2ObjectRBTreeMap(java.lang.Double[] keys,
V[] 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 Double2ObjectRBTreeMap(java.lang.Double[] keys,
V[] 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 Double2ObjectRBTreeMap(double[] keys,
V[] 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 Double2ObjectRBTreeMap(double[] keys,
V[] 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 Double2ObjectRBTreeMap(java.util.Map<? extends java.lang.Double,? extends V> map)
map - the values that should be present in the mappublic Double2ObjectRBTreeMap(java.util.Map<? extends java.lang.Double,? extends V> 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 Double2ObjectRBTreeMap(Double2ObjectMap<V> map)
map - the values that should be present in the mappublic Double2ObjectRBTreeMap(Double2ObjectMap<V> 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)
Double2ObjectNavigableMapsetDefaultMaxValue in interface Double2ObjectNavigableMap<V>value - the new max valuepublic double getDefaultMaxValue()
Double2ObjectNavigableMapgetDefaultMaxValue in interface Double2ObjectNavigableMap<V>public void setDefaultMinValue(double value)
Double2ObjectNavigableMapsetDefaultMinValue in interface Double2ObjectNavigableMap<V>value - the new min valuepublic double getDefaultMinValue()
Double2ObjectNavigableMapgetDefaultMinValue in interface Double2ObjectNavigableMap<V>public V put(double key, V value)
Double2ObjectMapput in interface Double2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(double key, V value)
Double2ObjectMapputIfAbsent in interface Double2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,V>comparator in interface Double2ObjectSortedMap<V>public boolean containsKey(double key)
Double2ObjectMapcontainsKey in interface Double2ObjectMap<V>containsKey in class AbstractDouble2ObjectMap<V>key - element that is searched forpublic V get(double key)
Double2ObjectMapget in interface Double2ObjectFunction<V>get in interface Double2ObjectMap<V>key - the key that is searched forpublic V getOrDefault(double key, V defaultValue)
Double2ObjectMapgetOrDefault in interface Double2ObjectMap<V>getOrDefault in class AbstractDouble2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double firstDoubleKey()
Double2ObjectSortedMapfirstDoubleKey in interface Double2ObjectSortedMap<V>public double pollFirstDoubleKey()
Double2ObjectSortedMappollFirstDoubleKey in interface Double2ObjectSortedMap<V>public double lastDoubleKey()
Double2ObjectSortedMaplastDoubleKey in interface Double2ObjectSortedMap<V>public double pollLastDoubleKey()
Double2ObjectSortedMappollLastDoubleKey in interface Double2ObjectSortedMap<V>public Double2ObjectMap.Entry<V> firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Double,V>firstEntry in interface Double2ObjectNavigableMap<V>public Double2ObjectMap.Entry<V> lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Double,V>lastEntry in interface Double2ObjectNavigableMap<V>public Double2ObjectMap.Entry<V> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Double,V>pollFirstEntry in interface Double2ObjectNavigableMap<V>public Double2ObjectMap.Entry<V> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Double,V>pollLastEntry in interface Double2ObjectNavigableMap<V>public V firstValue()
Double2ObjectSortedMapfirstValue in interface Double2ObjectSortedMap<V>public V lastValue()
Double2ObjectSortedMaplastValue in interface Double2ObjectSortedMap<V>public V remove(double key)
Double2ObjectMapremove in interface Double2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(double key, V defaultValue)
Double2ObjectMapremoveOrDefault in interface Double2ObjectMap<V>key - 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,
V value)
Double2ObjectMapremove in interface Double2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
V oldValue,
V newValue)
Double2ObjectMapreplace in interface Double2ObjectMap<V>replace in class AbstractDouble2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(double key, V value)
Double2ObjectMapreplace in interface Double2ObjectMap<V>replace in class AbstractDouble2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public V compute(double key, DoubleObjectUnaryOperator<V> mappingFunction)
Double2ObjectMapcompute in interface Double2ObjectMap<V>compute in class AbstractDouble2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(double key, Double2ObjectFunction<V> mappingFunction)
Double2ObjectMapcomputeIfAbsent in interface Double2ObjectMap<V>computeIfAbsent in class AbstractDouble2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(double key, ObjectSupplier<V> valueProvider)
Double2ObjectMapsupplyIfAbsent in interface Double2ObjectMap<V>supplyIfAbsent in class AbstractDouble2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(double key, DoubleObjectUnaryOperator<V> mappingFunction)
Double2ObjectMapcomputeIfPresent in interface Double2ObjectMap<V>computeIfPresent in class AbstractDouble2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(double key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Double2ObjectMapmerge in interface Double2ObjectMap<V>merge in class AbstractDouble2ObjectMap<V>key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAll(Double2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Double2ObjectMapmergeAll in interface Double2ObjectMap<V>mergeAll in class AbstractDouble2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(DoubleObjectConsumer<V> action)
Double2ObjectMapforEach in interface Double2ObjectMap<V>forEach in class AbstractDouble2ObjectMap<V>action - processor of the values that are iterator overpublic int size()
public void clear()
public Double2ObjectRBTreeMap<V> copy()
Double2ObjectMapcopy in interface Double2ObjectMap<V>copy in interface Double2ObjectNavigableMap<V>copy in interface Double2ObjectSortedMap<V>copy in class AbstractDouble2ObjectMap<V>public DoubleNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Double,V>keySet in interface java.util.SortedMap<java.lang.Double,V>keySet in interface Double2ObjectMap<V>keySet in interface Double2ObjectNavigableMap<V>keySet in interface Double2ObjectSortedMap<V>keySet in class AbstractDouble2ObjectMap<V>public ObjectSet<Double2ObjectMap.Entry<V>> double2ObjectEntrySet()
Double2ObjectMapdouble2ObjectEntrySet in interface Double2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Double,V>values in interface java.util.SortedMap<java.lang.Double,V>values in interface Double2ObjectMap<V>values in interface Double2ObjectSortedMap<V>values in class AbstractDouble2ObjectMap<V>public DoubleNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Double,V>navigableKeySet in interface Double2ObjectNavigableMap<V>public Double2ObjectNavigableMap<V> descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Double,V>descendingMap in interface Double2ObjectNavigableMap<V>public DoubleNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Double,V>descendingKeySet in interface Double2ObjectNavigableMap<V>public Double2ObjectNavigableMap<V> subMap(double fromKey, boolean fromInclusive, double toKey, boolean toInclusive)
Double2ObjectNavigableMapsubMap in interface Double2ObjectNavigableMap<V>fromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Double2ObjectNavigableMap<V> headMap(double toKey, boolean inclusive)
Double2ObjectNavigableMapheadMap in interface Double2ObjectNavigableMap<V>toKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Double2ObjectNavigableMap<V> tailMap(double fromKey, boolean inclusive)
Double2ObjectNavigableMaptailMap in interface Double2ObjectNavigableMap<V>fromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic double lowerKey(double e)
Double2ObjectNavigableMaplowerKey in interface Double2ObjectNavigableMap<V>e - that should be compared with.public double floorKey(double e)
Double2ObjectNavigableMapfloorKey in interface Double2ObjectNavigableMap<V>e - that should be compared with.public double higherKey(double e)
Double2ObjectNavigableMaphigherKey in interface Double2ObjectNavigableMap<V>e - that should be compared with.public double ceilingKey(double e)
Double2ObjectNavigableMapceilingKey in interface Double2ObjectNavigableMap<V>e - that should be compared with.public Double2ObjectMap.Entry<V> lowerEntry(double key)
Double2ObjectNavigableMaplowerEntry in interface Double2ObjectNavigableMap<V>key - that should be compared with.public Double2ObjectMap.Entry<V> higherEntry(double key)
Double2ObjectNavigableMaphigherEntry in interface Double2ObjectNavigableMap<V>key - that should be compared with.public Double2ObjectMap.Entry<V> floorEntry(double key)
Double2ObjectNavigableMapfloorEntry in interface Double2ObjectNavigableMap<V>key - that should be compared with.public Double2ObjectMap.Entry<V> ceilingEntry(double key)
Double2ObjectNavigableMapceilingEntry in interface Double2ObjectNavigableMap<V>key - that should be compared with.