V - the type of elements maintained by this Collectionpublic static class Long2ObjectMaps.SingletonMap<V> extends AbstractLong2ObjectMap<V>
AbstractLong2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ObjectMap.Entry<V>, Long2ObjectMap.FastEntrySet<V>| Modifier and Type | Method and Description |
|---|---|
V |
getObject(long key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(long key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2ObjectMap.Entry<V>> |
long2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
put(long key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(long key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remLong(long key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remLongOrDefault(long key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(long key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, merge, mergeAll, putAll, putAll, putAll, putAllIfAbsent, replace, replace, replaceObjects, replaceObjects, setDefaultReturnValueclear, containsKey, isEmpty, put, remove, size, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, forEach, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllapplypublic V put(long key, V value)
Long2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(long key, V value)
Long2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remLong(long key)
Long2ObjectMapkey - the element that should be removedpublic V remLongOrDefault(long key, V defaultValue)
Long2ObjectMapkey - 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,
V value)
Long2ObjectMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V getObject(long key)
Long2ObjectMapkey - the key that is searched forpublic V getOrDefault(long key, V defaultValue)
Long2ObjectMapgetOrDefault in interface Long2ObjectMap<V>getOrDefault in class AbstractLong2ObjectMap<V>key - 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,V>keySet in interface Long2ObjectMap<V>keySet in class AbstractLong2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Long,V>values in interface Long2ObjectMap<V>values in class AbstractLong2ObjectMap<V>public ObjectSet<Long2ObjectMap.Entry<V>> long2ObjectEntrySet()
Long2ObjectMap