T - the type of elements maintained by this Collectionpublic static class Object2IntMaps.EmptyMap<T> extends AbstractObject2IntMap<T>
AbstractObject2IntMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2IntMap.Entry<T>, Object2IntMap.FastEntrySet<T>| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(T key,
int value)
A Helper method to add a primitives together.
|
int |
getInt(T key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(T key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2IntMap.Entry<T>> |
object2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
put(T key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(T key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
int |
remOrDefault(T key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T 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, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplyAsIntpublic int put(T key, int value)
Object2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(T key, int value)
Object2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(T key, int value)
Object2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int rem(T key)
Object2IntMapkey - the element that should be removedpublic int remOrDefault(T key, int defaultValue)
Object2IntMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, int value)
Object2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int getInt(T key)
Object2IntMapkey - the key that is searched forpublic int getOrDefault(T key, int defaultValue)
Object2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Integer>keySet in interface Object2IntMap<T>keySet in class AbstractObject2IntMap<T>public IntCollection values()
values in interface java.util.Map<T,java.lang.Integer>values in interface Object2IntMap<T>values in class AbstractObject2IntMap<T>public ObjectSet<Object2IntMap.Entry<T>> object2IntEntrySet()
Object2IntMap