public static class Long2LongMaps.SynchronizedMap extends AbstractLong2LongMap implements Long2LongMap
AbstractLong2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2LongMap.BuilderCache, Long2LongMap.Entry, Long2LongMap.FastEntrySet, Long2LongMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
long |
addTo(long key,
long value)
A Helper method to add a primitives together.
|
void |
addToAll(Long2LongMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Long |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
long |
computeLong(long key,
LongLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(long key,
Long2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(long key,
LongLongUnaryOperator 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(long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Long2LongMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Long> action)
Deprecated.
|
void |
forEach(LongLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key)
Deprecated.
|
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(long key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
Deprecated.
|
LongSet |
keySet() |
ObjectSet<Long2LongMap.Entry> |
long2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
java.lang.Long |
merge(java.lang.Long key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
mergeAllLong(Long2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(long key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(long key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Long |
put(java.lang.Long key,
java.lang.Long value)
Deprecated.
|
void |
putAll(long[] keys,
long[] 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(Long2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Long2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
long |
putIfAbsent(long key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Long |
putIfAbsent(java.lang.Long key,
java.lang.Long value)
Deprecated.
|
long |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Long |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
long |
removeOrDefault(long key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
replace(long key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Long |
replace(java.lang.Long key,
java.lang.Long value)
Deprecated.
|
boolean |
replace(long key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
java.lang.Long oldValue,
java.lang.Long newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
replaceLongs(Long2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(LongLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
long |
subFrom(long key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(long key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiableapplyAsLongpublic long getDefaultReturnValue()
Long2LongMapgetDefaultReturnValue in interface Long2LongMapgetDefaultReturnValue in class AbstractLong2LongMappublic AbstractLong2LongMap setDefaultReturnValue(long v)
Long2LongMapsetDefaultReturnValue in interface Long2LongMapsetDefaultReturnValue in class AbstractLong2LongMapv - value that should be the default return valuepublic long put(long key,
long value)
Long2LongMapput in interface Long2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(long key,
long value)
Long2LongMapputIfAbsent in interface Long2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2LongMap m)
Long2LongMapputAllIfAbsent in interface Long2LongMapputAllIfAbsent in class AbstractLong2LongMapm - elements that should be added if not present.public long addTo(long key,
long value)
Long2LongMapaddTo in interface Long2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(long key,
long value)
Long2LongMapLong2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Long2LongMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Long2LongMap m)
Long2LongMapaddToAll in interface Long2LongMapaddToAll in class AbstractLong2LongMapm - the values that should be added/insertedpublic void putAll(Long2LongMap m)
Long2LongMapputAll in interface Long2LongMapputAll in class AbstractLong2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Long>putAll in class AbstractLong2LongMappublic void putAll(long[] keys,
long[] values,
int offset,
int size)
Long2LongMapputAll in interface Long2LongMapputAll in class AbstractLong2LongMapkeys - 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)
Long2LongMapcontainsKey in interface Long2LongMapcontainsKey in class AbstractLong2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Long2LongMapcontainsValue in interface Long2LongMapcontainsValue in class AbstractLong2LongMapvalue - element that is searched forpublic long get(long key)
Long2LongMapget in interface Long2LongFunctionget in interface Long2LongMapkey - the key that is searched forpublic long remove(long key)
Long2LongMapremove in interface Long2LongMapkey - the element that should be removedpublic long removeOrDefault(long key,
long defaultValue)
Long2LongMapremoveOrDefault in interface Long2LongMapkey - 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,
long value)
Long2LongMapremove in interface Long2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
long oldValue,
long newValue)
Long2LongMapreplace in interface Long2LongMapreplace in class AbstractLong2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(long key,
long value)
Long2LongMapreplace in interface Long2LongMapreplace in class AbstractLong2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Long2LongMap m)
Long2LongMapreplaceLongs in interface Long2LongMapreplaceLongs in class AbstractLong2LongMapm - elements that should be replaced.public void replaceLongs(LongLongUnaryOperator mappingFunction)
Long2LongMapreplaceLongs in interface Long2LongMapreplaceLongs in class AbstractLong2LongMapmappingFunction - operation to replace all valuespublic long computeLong(long key,
LongLongUnaryOperator mappingFunction)
Long2LongMapcomputeLong in interface Long2LongMapcomputeLong in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(long key,
Long2LongFunction mappingFunction)
Long2LongMapcomputeLongIfAbsent in interface Long2LongMapcomputeLongIfAbsent in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(long key,
LongLongUnaryOperator mappingFunction)
Long2LongMapcomputeLongIfPresent in interface Long2LongMapcomputeLongIfPresent in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(long key,
LongSupplier valueProvider)
Long2LongMapsupplyLongIfAbsent in interface Long2LongMapsupplyLongIfAbsent in class AbstractLong2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(long key,
long value,
LongLongUnaryOperator mappingFunction)
Long2LongMapmergeLong in interface Long2LongMapmergeLong in class AbstractLong2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Long2LongMap m, LongLongUnaryOperator mappingFunction)
Long2LongMapmergeAllLong in interface Long2LongMapmergeAllLong in class AbstractLong2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic long getOrDefault(long key,
long defaultValue)
Long2LongMapgetOrDefault in interface Long2LongMapgetOrDefault in class AbstractLong2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongLongConsumer action)
Long2LongMapforEach in interface Long2LongMapforEach in class AbstractLong2LongMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Long>size in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public Long2LongMap copy()
Long2LongMapcopy in interface Long2LongMapcopy in class AbstractLong2LongMappublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Long>keySet in interface Long2LongMapkeySet in class AbstractLong2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Long>values in interface Long2LongMapvalues in class AbstractLong2LongMappublic ObjectSet<Long2LongMap.Entry> long2LongEntrySet()
Long2LongMaplong2LongEntrySet in interface Long2LongMap@Deprecated public java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Long>get in interface Long2LongMapget in class AbstractLong2LongMap@Deprecated
public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Long>getOrDefault in interface Long2LongMapgetOrDefault in class AbstractLong2LongMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Long>containsValue in interface Long2LongMapcontainsValue in class java.util.AbstractMap<java.lang.Long,java.lang.Long>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Long,java.lang.Long>containsKey in interface Long2LongMapcontainsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Long>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Long put(java.lang.Long key,
java.lang.Long value)
put in interface java.util.Map<java.lang.Long,java.lang.Long>put in interface Long2LongMapput in class AbstractLong2LongMap@Deprecated public java.lang.Long remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,java.lang.Long>remove in interface Long2LongMapremove in class AbstractLong2LongMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Long>@Deprecated
public java.lang.Long putIfAbsent(java.lang.Long key,
java.lang.Long value)
putIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Long>putIfAbsent in interface Long2LongMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,java.lang.Long>remove in interface Long2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Long key,
java.lang.Long oldValue,
java.lang.Long newValue)
replace in interface java.util.Map<java.lang.Long,java.lang.Long>replace in interface Long2LongMap@Deprecated
public java.lang.Long replace(java.lang.Long key,
java.lang.Long value)
replace in interface java.util.Map<java.lang.Long,java.lang.Long>replace in interface Long2LongMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,java.lang.Long>replaceAll in interface Long2LongMap@Deprecated
public java.lang.Long compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
compute in interface java.util.Map<java.lang.Long,java.lang.Long>compute in interface Long2LongMap@Deprecated
public java.lang.Long computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Long> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Long>computeIfAbsent in interface Long2LongMap@Deprecated
public java.lang.Long computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,java.lang.Long>computeIfPresent in interface Long2LongMap@Deprecated
public java.lang.Long merge(java.lang.Long key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
merge in interface java.util.Map<java.lang.Long,java.lang.Long>merge in interface Long2LongMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Long> action)
forEach in interface java.util.Map<java.lang.Long,java.lang.Long>forEach in interface Long2LongMap