T - the type of elements maintained by this Collectionpublic static class Object2DoubleMaps.SingletonMap<T> extends AbstractObject2DoubleMap<T>
AbstractObject2DoubleMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2DoubleMap.Entry<T>, Object2DoubleMap.FastEntrySet<T>| Modifier and Type | Method and Description |
|---|---|
double |
addTo(T key,
double value)
A Helper method to add a primitives together.
|
double |
getDouble(T key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(T key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2DoubleMap.Entry<T>> |
object2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
put(T key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(T key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
double |
remOrDefault(T key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
DoubleCollection |
values() |
addToAll, computeDouble, computeDoubleIfAbsent, computeDoubleIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllDouble, mergeDouble, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceDoubles, replaceDoubles, setDefaultReturnValueclear, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplyAsDoublepublic double put(T key, double value)
Object2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(T key, double value)
Object2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(T key, double value)
Object2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double rem(T key)
Object2DoubleMapkey - the element that should be removedpublic double remOrDefault(T key, double defaultValue)
Object2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, double value)
Object2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double getDouble(T key)
Object2DoubleMapkey - the key that is searched forpublic double getOrDefault(T key, double defaultValue)
Object2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Double>keySet in interface Object2DoubleMap<T>keySet in class AbstractObject2DoubleMap<T>public DoubleCollection values()
values in interface java.util.Map<T,java.lang.Double>values in interface Object2DoubleMap<T>values in class AbstractObject2DoubleMap<T>public ObjectSet<Object2DoubleMap.Entry<T>> object2DoubleEntrySet()
Object2DoubleMap