T - the type of elements maintained by this Collectionpublic class Enum2DoubleMap<T extends java.lang.Enum<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>| Constructor and Description |
|---|
Enum2DoubleMap(java.lang.Class<T> keyType)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(T key,
double value)
A Helper method to add a primitives together.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
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, 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 Enum2DoubleMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic 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 boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Double>containsKey in class AbstractObject2DoubleMap<T extends java.lang.Enum<T>>public boolean containsValue(double value)
Object2DoubleMapcontainsValue in interface Object2DoubleMap<T extends java.lang.Enum<T>>containsValue in class AbstractObject2DoubleMap<T extends java.lang.Enum<T>>value - element that is searched forpublic 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<Object2DoubleMap.Entry<T>> object2DoubleEntrySet()
Object2DoubleMappublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Double>keySet in interface Object2DoubleMap<T extends java.lang.Enum<T>>keySet in class AbstractObject2DoubleMap<T extends java.lang.Enum<T>>public DoubleCollection values()
values in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Double>values in interface Object2DoubleMap<T extends java.lang.Enum<T>>values in class AbstractObject2DoubleMap<T extends java.lang.Enum<T>>