T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic class Enum2ObjectMap<T extends java.lang.Enum<T>,V> extends AbstractObject2ObjectMap<T,V>
AbstractObject2ObjectMap.BasicEntry<T,V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ObjectMap.Entry<T,V>, Object2ObjectMap.FastEntrySet<T,V>| Constructor and Description |
|---|
Enum2ObjectMap(java.lang.Class<T> keyType)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
V |
getObject(T key)
Type Specific get function to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
ObjectSet<T> |
keySet() |
ObjectSet<Object2ObjectMap.Entry<T,V>> |
object2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
put(T key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(T key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remOrDefault(T key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, entrySet, equals, forEach, get, getDefaultReturnValue, hashCode, merge, mergeAll, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceObjects, replaceObjects, setDefaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, merge, putAll, remove, replaceAllapplypublic Enum2ObjectMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic V put(T key, V value)
Object2ObjectMapput in interface java.util.Map<T extends java.lang.Enum<T>,V>put in interface Object2ObjectMap<T extends java.lang.Enum<T>,V>put in class java.util.AbstractMap<T extends java.lang.Enum<T>,V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(T key, V value)
Object2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T extends java.lang.Enum<T>,V>containsKey in class AbstractObject2ObjectMap<T extends java.lang.Enum<T>,V>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T extends java.lang.Enum<T>,V>containsValue in class AbstractObject2ObjectMap<T extends java.lang.Enum<T>,V>public V rem(T key)
Object2ObjectMapkey - the element that should be removedpublic V remOrDefault(T key, V defaultValue)
Object2ObjectMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
public V getObject(T key)
Object2ObjectFunctionkey - the value that should be processedpublic V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<T extends java.lang.Enum<T>,V>getOrDefault in class AbstractObject2ObjectMap<T extends java.lang.Enum<T>,V>public ObjectSet<Object2ObjectMap.Entry<T,V>> object2ObjectEntrySet()
Object2ObjectMappublic ObjectCollection<V> values()