V - the type of elements maintained by this Collectionpublic static class Short2ObjectMaps.SingletonMap<V> extends AbstractShort2ObjectMap<V>
AbstractShort2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ObjectMap.Entry<V>, Short2ObjectMap.FastEntrySet<V>| Modifier and Type | Method and Description |
|---|---|
V |
getObject(short key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(short key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
V |
put(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(short key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
remShort(short key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remShortOrDefault(short key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
ObjectSet<Short2ObjectMap.Entry<V>> |
short2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, merge, mergeAll, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceObjects, replaceObjects, setDefaultReturnValueclear, containsKey, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic V put(short key, V value)
Short2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(short key, V value)
Short2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remShort(short key)
Short2ObjectMapkey - the element that should be removedpublic V remShortOrDefault(short key, V defaultValue)
Short2ObjectMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
V value)
Short2ObjectMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V getObject(short key)
Short2ObjectMapkey - the key that is searched forpublic V getOrDefault(short key, V defaultValue)
Short2ObjectMapgetOrDefault in interface Short2ObjectMap<V>getOrDefault in class AbstractShort2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,V>keySet in interface Short2ObjectMap<V>keySet in class AbstractShort2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Short,V>values in interface Short2ObjectMap<V>values in class AbstractShort2ObjectMap<V>public ObjectSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet()
Short2ObjectMap