V - the type of elements maintained by this Collectionpublic static class Long2ObjectMaps.SynchronizedMap<V> extends AbstractLong2ObjectMap<V> implements Long2ObjectMap<V>
AbstractLong2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ObjectMap.BuilderCache<V>, Long2ObjectMap.Entry<V>, Long2ObjectMap.FastEntrySet<V>, Long2ObjectMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
|
V |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
compute(long key,
LongObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfAbsent(long key,
Long2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfPresent(long key,
LongObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Long2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super V> action)
Deprecated.
|
void |
forEach(LongObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
V |
get(java.lang.Object key)
Deprecated.
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(long key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue)
Deprecated.
|
LongSet |
keySet() |
ObjectSet<Long2ObjectMap.Entry<V>> |
long2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
merge(java.lang.Long key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
merge(long key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Long2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(long key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
put(java.lang.Long key,
V value)
Deprecated.
|
void |
putAll(long[] keys,
V[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Long2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends V> m) |
void |
putAllIfAbsent(Long2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
putIfAbsent(long key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(java.lang.Long key,
V value)
Deprecated.
|
V |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
V |
removeOrDefault(long key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(long key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
V |
replace(java.lang.Long key,
V value)
Deprecated.
|
boolean |
replace(long key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
V oldValue,
V newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
Deprecated.
|
void |
replaceObjects(Long2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(LongObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
V |
supplyIfAbsent(long key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiableapplypublic V getDefaultReturnValue()
Long2ObjectMapgetDefaultReturnValue in interface Long2ObjectMap<V>getDefaultReturnValue in class AbstractLong2ObjectMap<V>public AbstractLong2ObjectMap<V> setDefaultReturnValue(V v)
Long2ObjectMapsetDefaultReturnValue in interface Long2ObjectMap<V>setDefaultReturnValue in class AbstractLong2ObjectMap<V>v - value that should be the default return valuepublic V put(long key, V value)
Long2ObjectMapput in interface Long2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(long key, V value)
Long2ObjectMapputIfAbsent in interface Long2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2ObjectMap<V> m)
Long2ObjectMapputAllIfAbsent in interface Long2ObjectMap<V>putAllIfAbsent in class AbstractLong2ObjectMap<V>m - elements that should be added if not present.public void putAll(Long2ObjectMap<V> m)
Long2ObjectMapputAll in interface Long2ObjectMap<V>putAll in class AbstractLong2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends V> m)
putAll in interface java.util.Map<java.lang.Long,V>putAll in class AbstractLong2ObjectMap<V>public void putAll(long[] keys,
V[] values,
int offset,
int size)
Long2ObjectMapputAll in interface Long2ObjectMap<V>putAll in class AbstractLong2ObjectMap<V>keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsKey(long key)
Long2ObjectMapcontainsKey in interface Long2ObjectMap<V>containsKey in class AbstractLong2ObjectMap<V>key - element that is searched forpublic V get(long key)
Long2ObjectMapget in interface Long2ObjectFunction<V>get in interface Long2ObjectMap<V>key - the key that is searched forpublic V remove(long key)
Long2ObjectMapremove in interface Long2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(long key, V defaultValue)
Long2ObjectMapremoveOrDefault in interface Long2ObjectMap<V>key - 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)
Long2ObjectMapremove in interface Long2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
V oldValue,
V newValue)
Long2ObjectMapreplace in interface Long2ObjectMap<V>replace in class AbstractLong2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(long key, V value)
Long2ObjectMapreplace in interface Long2ObjectMap<V>replace in class AbstractLong2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Long2ObjectMap<V> m)
Long2ObjectMapreplaceObjects in interface Long2ObjectMap<V>replaceObjects in class AbstractLong2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(LongObjectUnaryOperator<V> mappingFunction)
Long2ObjectMapreplaceObjects in interface Long2ObjectMap<V>replaceObjects in class AbstractLong2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(long key, LongObjectUnaryOperator<V> mappingFunction)
Long2ObjectMapcompute in interface Long2ObjectMap<V>compute in class AbstractLong2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(long key, Long2ObjectFunction<V> mappingFunction)
Long2ObjectMapcomputeIfAbsent in interface Long2ObjectMap<V>computeIfAbsent in class AbstractLong2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(long key, LongObjectUnaryOperator<V> mappingFunction)
Long2ObjectMapcomputeIfPresent in interface Long2ObjectMap<V>computeIfPresent in class AbstractLong2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V supplyIfAbsent(long key, ObjectSupplier<V> valueProvider)
Long2ObjectMapsupplyIfAbsent in interface Long2ObjectMap<V>supplyIfAbsent in class AbstractLong2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V merge(long key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Long2ObjectMapmerge in interface Long2ObjectMap<V>merge in class AbstractLong2ObjectMap<V>key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAll(Long2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Long2ObjectMapmergeAll in interface Long2ObjectMap<V>mergeAll in class AbstractLong2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic 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 void forEach(LongObjectConsumer<V> action)
Long2ObjectMapforEach in interface Long2ObjectMap<V>forEach in class AbstractLong2ObjectMap<V>action - processor of the values that are iterator overpublic int size()
public Long2ObjectMap<V> copy()
Long2ObjectMapcopy in interface Long2ObjectMap<V>copy in class AbstractLong2ObjectMap<V>public 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()
Long2ObjectMaplong2ObjectEntrySet in interface Long2ObjectMap<V>@Deprecated public V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,V>get in interface Long2ObjectMap<V>get in class AbstractLong2ObjectMap<V>@Deprecated public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,V>getOrDefault in interface Long2ObjectMap<V>getOrDefault in class AbstractLong2ObjectMap<V>@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,V>containsValue in class AbstractLong2ObjectMap<V>@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Long,V>containsKey in interface Long2ObjectMap<V>containsKey in class java.util.AbstractMap<java.lang.Long,V>key - that is searched for.Map.containsKey(Object)@Deprecated public V put(java.lang.Long key, V value)
put in interface java.util.Map<java.lang.Long,V>put in interface Long2ObjectMap<V>put in class AbstractLong2ObjectMap<V>@Deprecated public V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,V>remove in interface Long2ObjectMap<V>remove in class AbstractLong2ObjectMap<V>key - the element that should be removedMap.remove(Object)@Deprecated public void clear()
@Deprecated public V putIfAbsent(java.lang.Long key, V value)
putIfAbsent in interface java.util.Map<java.lang.Long,V>putIfAbsent in interface Long2ObjectMap<V>@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,V>remove in interface Long2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Long key,
V oldValue,
V newValue)
replace in interface java.util.Map<java.lang.Long,V>replace in interface Long2ObjectMap<V>@Deprecated public V replace(java.lang.Long key, V value)
replace in interface java.util.Map<java.lang.Long,V>replace in interface Long2ObjectMap<V>@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,V>replaceAll in interface Long2ObjectMap<V>@Deprecated public V compute(java.lang.Long key, java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
compute in interface java.util.Map<java.lang.Long,V>compute in interface Long2ObjectMap<V>@Deprecated public V computeIfAbsent(java.lang.Long key, java.util.function.Function<? super java.lang.Long,? extends V> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,V>computeIfAbsent in interface Long2ObjectMap<V>@Deprecated public V computeIfPresent(java.lang.Long key, java.util.function.BiFunction<? super java.lang.Long,? super V,? extends V> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,V>computeIfPresent in interface Long2ObjectMap<V>@Deprecated public V merge(java.lang.Long key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
merge in interface java.util.Map<java.lang.Long,V>merge in interface Long2ObjectMap<V>@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super V> action)
forEach in interface java.util.Map<java.lang.Long,V>forEach in interface Long2ObjectMap<V>