V - the type of elements maintained by this Collectionpublic interface Long2ObjectMap<V> extends java.util.Map<java.lang.Long,V>, Long2ObjectFunction<V>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Long2ObjectMap.Entry<V>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Long2ObjectMap.FastEntrySet<V>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
| Modifier and Type | Method and Description |
|---|---|
default 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
|
default 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
|
default 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
|
default boolean |
containsKey(java.lang.Object key) |
ObjectSet<java.util.Map.Entry<java.lang.Long,V>> |
entrySet()
Deprecated.
|
default 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
|
default V |
get(java.lang.Object key)
Deprecated.
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
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
|
default 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.
|
default 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
|
default V |
put(java.lang.Long key,
V value)
Deprecated.
|
default void |
putAll(long[] keys,
V[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
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 |
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
|
default V |
putIfAbsent(java.lang.Long key,
V value)
Deprecated.
|
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
|
default V |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
V |
replace(long key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
default 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
|
default boolean |
replace(java.lang.Long key,
V oldValue,
V newValue)
Deprecated.
|
default 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
|
Long2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
ObjectCollection<V> |
values() |
clear, containsValue, equals, hashCode, isEmpty, putAll, sizeapplyV getDefaultReturnValue()
Long2ObjectMap<V> setDefaultReturnValue(V v)
v - value that should be the default return valueV put(long key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(long[] keys,
V[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(long[] keys,
V[] values,
int offset,
int size)
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 addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)V putIfAbsent(long key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Long2ObjectMap<V> m)
m - elements that should be added if not present.void putAll(Long2ObjectMap<V> m)
m - the elements that should be insertedboolean containsKey(long key)
key - element that is searched fordefault boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Long,V>key - that is searched for.Map.containsKey(Object)V remLong(long key)
key - the element that should be removeddefault V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,V>key - the element that should be removedMap.remove(Object)boolean remove(long key,
V value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)default boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)V remLongOrDefault(long key, V defaultValue)
key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)boolean replace(long key,
V oldValue,
V newValue)
key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.V replace(long key, V value)
key - the element that should be searched forvalue - the value to replace with.void replaceObjects(Long2ObjectMap<V> m)
m - elements that should be replaced.void replaceObjects(LongObjectUnaryOperator<V> mappingFunction)
mappingFunction - operation to replace all valuesV compute(long key, LongObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valueV computeIfAbsent(long key, Long2ObjectFunction<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentV computeIfPresent(long key, LongObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentV merge(long key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuevoid mergeAll(Long2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Value@Deprecated
default boolean replace(java.lang.Long key,
V oldValue,
V newValue)
replace in interface java.util.Map<java.lang.Long,V>@Deprecated default V replace(java.lang.Long key, V value)
replace in interface java.util.Map<java.lang.Long,V>V getObject(long key)
getObject in interface Long2ObjectFunction<V>key - the key that is searched forV getOrDefault(long key, V defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not present@Deprecated default V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,V>@Deprecated default V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,V>@Deprecated default 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>@Deprecated default 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>@Deprecated default 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>@Deprecated default 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>@Deprecated default 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>void forEach(LongObjectConsumer<V> action)
action - processor of the values that are iterator over@Deprecated default void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super V> action)
forEach in interface java.util.Map<java.lang.Long,V>ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Long,V>@Deprecated ObjectSet<java.util.Map.Entry<java.lang.Long,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Long,V>ObjectSet<Long2ObjectMap.Entry<V>> long2ObjectEntrySet()
@Deprecated default V put(java.lang.Long key, V value)
put in interface java.util.Map<java.lang.Long,V>