T - the type of elements maintained by this Collectionpublic static class Object2LongMaps.SingletonMap<T> extends AbstractObject2LongMap<T>
AbstractObject2LongMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2LongMap.Entry<T>, Object2LongMap.FastEntrySet<T>| Modifier and Type | Method and Description |
|---|---|
long |
addTo(T key,
long value)
A Helper method to add a primitives together.
|
long |
getLong(T key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(T key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
ObjectSet<Object2LongMap.Entry<T>> |
object2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
long |
put(T key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(T key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remOrDefault(T key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T 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, containsValue, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplyAsLongpublic long put(T key, long value)
Object2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(T key, long value)
Object2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(T key, long value)
Object2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long rem(T key)
Object2LongMapkey - the element that should be removedpublic long remOrDefault(T key, long defaultValue)
Object2LongMapkey - 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, long value)
Object2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long getLong(T key)
Object2LongMapkey - the key that is searched forpublic long getOrDefault(T key, long defaultValue)
Object2LongMapkey - 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.Long>keySet in interface Object2LongMap<T>keySet in class AbstractObject2LongMap<T>public LongCollection values()
values in interface java.util.Map<T,java.lang.Long>values in interface Object2LongMap<T>values in class AbstractObject2LongMap<T>public ObjectSet<Object2LongMap.Entry<T>> object2LongEntrySet()
Object2LongMap