public static class Int2LongMaps.SingletonMap extends AbstractInt2LongMap
AbstractInt2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2LongMap.Entry, Int2LongMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
long |
addTo(int key,
long value)
A Helper method to add a primitives together.
|
long |
getLong(int key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(int key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2LongMap.Entry> |
int2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
long |
put(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remInt(int key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remIntOrDefault(int key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(int key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
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, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplyAsLongpublic long put(int key,
long value)
Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(int key,
long value)
Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(int key,
long value)
Int2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long remInt(int key)
Int2LongMapkey - the element that should be removedpublic long remIntOrDefault(int key,
long defaultValue)
Int2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
long value)
Int2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long getLong(int key)
Int2LongMapkey - the key that is searched forpublic long getOrDefault(int key,
long defaultValue)
Int2LongMapgetOrDefault in interface Int2LongMapgetOrDefault in class AbstractInt2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Long>keySet in interface Int2LongMapkeySet in class AbstractInt2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Long>values in interface Int2LongMapvalues in class AbstractInt2LongMappublic ObjectSet<Int2LongMap.Entry> int2LongEntrySet()
Int2LongMap