T - the type of elements maintained by this Collectionpublic class Enum2ShortMap<T extends java.lang.Enum<T>> extends AbstractObject2ShortMap<T>
AbstractObject2ShortMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ShortMap.Entry<T>, Object2ShortMap.FastEntrySet<T>| Constructor and Description |
|---|
Enum2ShortMap(java.lang.Class<T> keyType)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
short |
addTo(T key,
short value)
A Helper method to add a primitives together.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
getOrDefault(T key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
short |
getShort(T key)
A Type Specific get method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2ShortMap.Entry<T>> |
object2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
short |
put(T key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(T key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
short |
remOrDefault(T key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
ShortCollection |
values() |
addToAll, computeShort, computeShortIfAbsent, computeShortIfPresent, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllShort, mergeShort, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceShorts, replaceShorts, setDefaultReturnValueclear, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic Enum2ShortMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic short put(T key, short value)
Object2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(T key, short value)
Object2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(T key, short value)
Object2ShortMapkey - 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.Short>containsKey in class AbstractObject2ShortMap<T extends java.lang.Enum<T>>public boolean containsValue(short value)
Object2ShortMapcontainsValue in interface Object2ShortMap<T extends java.lang.Enum<T>>containsValue in class AbstractObject2ShortMap<T extends java.lang.Enum<T>>value - element that is searched forpublic short rem(T key)
Object2ShortMapkey - the element that should be removedpublic short remOrDefault(T key, short defaultValue)
Object2ShortMapkey - 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, short value)
Object2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short getShort(T key)
Object2ShortMapkey - the key that is searched forpublic short getOrDefault(T key, short defaultValue)
Object2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<Object2ShortMap.Entry<T>> object2ShortEntrySet()
Object2ShortMappublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Short>keySet in interface Object2ShortMap<T extends java.lang.Enum<T>>keySet in class AbstractObject2ShortMap<T extends java.lang.Enum<T>>public ShortCollection values()
values in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Short>values in interface Object2ShortMap<T extends java.lang.Enum<T>>values in class AbstractObject2ShortMap<T extends java.lang.Enum<T>>