T - the type of elements maintained by this Collectionpublic class Enum2FloatMap<T extends java.lang.Enum<T>> extends AbstractObject2FloatMap<T>
AbstractObject2FloatMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatMap.Entry<T>, Object2FloatMap.FastEntrySet<T>| Constructor and Description |
|---|
Enum2FloatMap(java.lang.Class<T> keyType)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(T key,
float value)
A Helper method to add a primitives together.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
getFloat(T key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(T key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2FloatMap.Entry<T>> |
object2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
put(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remOrDefault(T key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
FloatCollection |
values() |
addToAll, computeFloat, computeFloatIfAbsent, computeFloatIfPresent, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllFloat, mergeFloat, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceFloats, replaceFloats, setDefaultReturnValueclear, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic Enum2FloatMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic float put(T key, float value)
Object2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(T key, float value)
Object2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(T key, float value)
Object2FloatMapkey - 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.Float>containsKey in class AbstractObject2FloatMap<T extends java.lang.Enum<T>>public boolean containsValue(float value)
Object2FloatMapcontainsValue in interface Object2FloatMap<T extends java.lang.Enum<T>>containsValue in class AbstractObject2FloatMap<T extends java.lang.Enum<T>>value - element that is searched forpublic float rem(T key)
Object2FloatMapkey - the element that should be removedpublic float remOrDefault(T key, float defaultValue)
Object2FloatMapkey - 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, float value)
Object2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float getFloat(T key)
Object2FloatMapkey - the key that is searched forpublic float getOrDefault(T key, float defaultValue)
Object2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<Object2FloatMap.Entry<T>> object2FloatEntrySet()
Object2FloatMappublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Float>keySet in interface Object2FloatMap<T extends java.lang.Enum<T>>keySet in class AbstractObject2FloatMap<T extends java.lang.Enum<T>>public FloatCollection values()
values in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Float>values in interface Object2FloatMap<T extends java.lang.Enum<T>>values in class AbstractObject2FloatMap<T extends java.lang.Enum<T>>