public static class Short2LongMaps.UnmodifyableMap extends AbstractShort2LongMap implements Short2LongMap
AbstractShort2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2LongMap.Entry, Short2LongMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
long |
addTo(short key,
long value)
A Helper method to add a primitives together.
|
long |
getLong(short key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(short key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
long |
put(short key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(short key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(short key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
remShort(short key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remShortOrDefault(short key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
ObjectSet<Short2LongMap.Entry> |
short2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
LongCollection |
values() |
addToAll, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllLong, mergeLong, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceLongs, replaceLongs, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddToAll, compute, computeIfAbsent, computeIfPresent, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, mergeAllLong, mergeLong, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, replaceLongs, replaceLongs, setDefaultReturnValuepublic long put(short key,
long value)
Short2LongMapput in interface Short2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(short key,
long value)
Short2LongMapputIfAbsent in interface Short2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(short key,
long value)
Short2LongMapaddTo in interface Short2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long remShort(short key)
Short2LongMapremShort in interface Short2LongMapkey - the element that should be removedpublic long remShortOrDefault(short key,
long defaultValue)
Short2LongMapremShortOrDefault in interface Short2LongMapkey - 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,
long value)
Short2LongMapremove in interface Short2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long getLong(short key)
Short2LongMapgetLong in interface Short2LongFunctiongetLong in interface Short2LongMapkey - the key that is searched forpublic long getOrDefault(short key,
long defaultValue)
Short2LongMapgetOrDefault in interface Short2LongMapgetOrDefault in class AbstractShort2LongMapkey - 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,java.lang.Long>keySet in interface Short2LongMapkeySet in class AbstractShort2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Long>values in interface Short2LongMapvalues in class AbstractShort2LongMappublic ObjectSet<Short2LongMap.Entry> short2LongEntrySet()
Short2LongMapshort2LongEntrySet in interface Short2LongMap