public static class Long2IntMaps.UnmodifyableMap extends AbstractLong2IntMap implements Long2IntMap
AbstractLong2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2IntMap.Entry, Long2IntMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
int |
addTo(long key,
int value)
A Helper method to add a primitives together.
|
int |
getInt(long key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(long key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2IntMap.Entry> |
long2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
put(long key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(long key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remLong(long key)
Type Specific remove function to reduce boxing/unboxing
|
int |
remLongOrDefault(long key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(long key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
IntCollection |
values() |
addToAll, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, mergeAllInt, mergeInt, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddToAll, compute, computeIfAbsent, computeIfPresent, computeInt, computeIntIfAbsent, computeIntIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, mergeAllInt, mergeInt, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, replaceInts, replaceInts, setDefaultReturnValueapplyAsIntpublic int put(long key,
int value)
Long2IntMapput in interface Long2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(long key,
int value)
Long2IntMapputIfAbsent in interface Long2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(long key,
int value)
Long2IntMapaddTo in interface Long2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int remLong(long key)
Long2IntMapremLong in interface Long2IntMapkey - the element that should be removedpublic int remLongOrDefault(long key,
int defaultValue)
Long2IntMapremLongOrDefault in interface Long2IntMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
int value)
Long2IntMapremove in interface Long2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int getInt(long key)
Long2IntMapgetInt in interface Long2IntFunctiongetInt in interface Long2IntMapkey - the key that is searched forpublic int getOrDefault(long key,
int defaultValue)
Long2IntMapgetOrDefault in interface Long2IntMapgetOrDefault in class AbstractLong2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Integer>keySet in interface Long2IntMapkeySet in class AbstractLong2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Integer>values in interface Long2IntMapvalues in class AbstractLong2IntMappublic ObjectSet<Long2IntMap.Entry> long2IntEntrySet()
Long2IntMaplong2IntEntrySet in interface Long2IntMap