V - the type of elements maintained by this Collectionpublic static class Double2ObjectMaps.SingletonMap<V> extends AbstractDouble2ObjectMap<V>
AbstractDouble2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ObjectMap.BuilderCache<V>, Double2ObjectMap.Entry<V>, Double2ObjectMap.FastEntrySet<V>, Double2ObjectMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
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
|
Double2ObjectMaps.SingletonMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2ObjectMap.Entry<V>> |
double2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(double key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleSet |
keySet() |
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.
|
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 |
supplyIfAbsent(double key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceObjects, replaceObjects, setDefaultReturnValuebuilder, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiableapplypublic V put(double key, V value)
Double2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(double key, V value)
Double2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remove(double key)
Double2ObjectMapkey - the element that should be removedpublic V removeOrDefault(double key, V defaultValue)
Double2ObjectMapkey - 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)
Double2ObjectMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V get(double key)
Double2ObjectMapkey - 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 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 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 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 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 Double2ObjectMaps.SingletonMap<V> copy()
Double2ObjectMapcopy in interface Double2ObjectMap<V>copy in class AbstractDouble2ObjectMap<V>public DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,V>keySet in interface Double2ObjectMap<V>keySet in class AbstractDouble2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Double,V>values in interface Double2ObjectMap<V>values in class AbstractDouble2ObjectMap<V>public ObjectSet<Double2ObjectMap.Entry<V>> double2ObjectEntrySet()
Double2ObjectMap