public static class Int2IntMaps.EmptyMap extends AbstractInt2IntMap
AbstractInt2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2IntMap.Entry, Int2IntMap.FastEntrySet| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(int key,
int value)
A Helper method to add a primitives together.
|
int |
getInt(int key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(int key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2IntMap.Entry> |
int2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
int |
put(int key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(int key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remInt(int key)
Type Specific remove function to reduce boxing/unboxing
|
int |
remIntOrDefault(int key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(int 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, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplyAsIntpublic int put(int key,
int value)
Int2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(int key,
int value)
Int2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(int key,
int value)
Int2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int remInt(int key)
Int2IntMapkey - the element that should be removedpublic int remIntOrDefault(int key,
int defaultValue)
Int2IntMapkey - 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,
int value)
Int2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int getInt(int key)
Int2IntMapkey - the key that is searched forpublic int getOrDefault(int key,
int defaultValue)
Int2IntMapgetOrDefault in interface Int2IntMapgetOrDefault in class AbstractInt2IntMapkey - 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.Integer>keySet in interface Int2IntMapkeySet in class AbstractInt2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Integer>values in interface Int2IntMapvalues in class AbstractInt2IntMappublic ObjectSet<Int2IntMap.Entry> int2IntEntrySet()
Int2IntMap