T - the type of elements maintained by this Collectionpublic class Enum2ByteMap<T extends java.lang.Enum<T>> extends AbstractObject2ByteMap<T>
AbstractObject2ByteMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ByteMap.Entry<T>, Object2ByteMap.FastEntrySet<T>| Constructor and Description |
|---|
Enum2ByteMap(java.lang.Class<T> keyType)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(T key,
byte value)
A Helper method to add a primitives together.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
getByte(T key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(T key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2ByteMap.Entry<T>> |
object2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
put(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
byte |
remOrDefault(T key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
ByteCollection |
values() |
addToAll, computeByte, computeByteIfAbsent, computeByteIfPresent, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllByte, mergeByte, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceBytes, replaceBytes, setDefaultReturnValueclear, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic Enum2ByteMap(java.lang.Class<T> keyType)
keyType - the type of Enum that should be usedpublic byte put(T key, byte value)
Object2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(T key, byte value)
Object2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(T key, byte value)
Object2ByteMapkey - 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.Byte>containsKey in class AbstractObject2ByteMap<T extends java.lang.Enum<T>>public boolean containsValue(byte value)
Object2ByteMapcontainsValue in interface Object2ByteMap<T extends java.lang.Enum<T>>containsValue in class AbstractObject2ByteMap<T extends java.lang.Enum<T>>value - element that is searched forpublic byte rem(T key)
Object2ByteMapkey - the element that should be removedpublic byte remOrDefault(T key, byte defaultValue)
Object2ByteMapkey - 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, byte value)
Object2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte getByte(T key)
Object2ByteMapkey - the key that is searched forpublic byte getOrDefault(T key, byte defaultValue)
Object2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<Object2ByteMap.Entry<T>> object2ByteEntrySet()
Object2ByteMappublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Byte>keySet in interface Object2ByteMap<T extends java.lang.Enum<T>>keySet in class AbstractObject2ByteMap<T extends java.lang.Enum<T>>public ByteCollection values()
values in interface java.util.Map<T extends java.lang.Enum<T>,java.lang.Byte>values in interface Object2ByteMap<T extends java.lang.Enum<T>>values in class AbstractObject2ByteMap<T extends java.lang.Enum<T>>