public static class Long2DoubleMaps.SynchronizedMap extends AbstractLong2DoubleMap implements Long2DoubleMap
AbstractLong2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2DoubleMap.Entry, Long2DoubleMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
double |
addTo(long key,
double value)
A Helper method to add a primitives together.
|
void |
addToAll(Long2DoubleMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Double |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
double |
computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Double |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Double> mappingFunction)
Deprecated.
|
java.lang.Double |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Double> action)
Deprecated.
|
void |
forEach(LongDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Double |
get(java.lang.Object key)
Deprecated.
|
double |
getDefaultReturnValue()
Method to see what the default return value is.
|
double |
getDouble(long key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(long key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Double |
getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
Deprecated.
|
LongSet |
keySet() |
ObjectSet<Long2DoubleMap.Entry> |
long2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
java.lang.Double |
merge(java.lang.Long key,
java.lang.Double value,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
void |
mergeAllDouble(Long2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
double |
put(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Double |
put(java.lang.Long key,
java.lang.Double value)
Deprecated.
|
void |
putAll(long[] keys,
double[] 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(Long2DoubleMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> m) |
void |
putAllIfAbsent(Long2DoubleMap m)
Type-Specific bulk put method put elements into the map if not present.
|
double |
putIfAbsent(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Double |
putIfAbsent(java.lang.Long key,
java.lang.Double value)
Deprecated.
|
double |
remLong(long key)
Type Specific remove function to reduce boxing/unboxing
|
double |
remLongOrDefault(long key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(long key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Double |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
double |
replace(long key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Double |
replace(java.lang.Long key,
java.lang.Double value)
Deprecated.
|
boolean |
replace(long key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
java.lang.Double oldValue,
java.lang.Double newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
void |
replaceDoubles(Long2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(LongDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2DoubleMap |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
DoubleCollection |
values() |
entrySet, equals, hashCodeentrySet, putAllapplyAsDoublepublic double getDefaultReturnValue()
Long2DoubleMapgetDefaultReturnValue in interface Long2DoubleMapgetDefaultReturnValue in class AbstractLong2DoubleMappublic AbstractLong2DoubleMap setDefaultReturnValue(double v)
Long2DoubleMapsetDefaultReturnValue in interface Long2DoubleMapsetDefaultReturnValue in class AbstractLong2DoubleMapv - value that should be the default return valuepublic double put(long key,
double value)
Long2DoubleMapput in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(long key,
double value)
Long2DoubleMapputIfAbsent in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2DoubleMap m)
Long2DoubleMapputAllIfAbsent in interface Long2DoubleMapputAllIfAbsent in class AbstractLong2DoubleMapm - elements that should be added if not present.public double addTo(long key,
double value)
Long2DoubleMapaddTo in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic void addToAll(Long2DoubleMap m)
Long2DoubleMapaddToAll in interface Long2DoubleMapaddToAll in class AbstractLong2DoubleMapm - the values that should be added/insertedpublic void putAll(Long2DoubleMap m)
Long2DoubleMapputAll in interface Long2DoubleMapputAll in class AbstractLong2DoubleMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Double>putAll in class AbstractLong2DoubleMappublic void putAll(long[] keys,
double[] values,
int offset,
int size)
Long2DoubleMapputAll in interface Long2DoubleMapputAll in class AbstractLong2DoubleMapkeys - 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)
Long2DoubleMapcontainsKey in interface Long2DoubleMapcontainsKey in class AbstractLong2DoubleMapkey - element that is searched forpublic boolean containsValue(double value)
Long2DoubleMapcontainsValue in interface Long2DoubleMapcontainsValue in class AbstractLong2DoubleMapvalue - element that is searched forpublic double getDouble(long key)
Long2DoubleMapgetDouble in interface Long2DoubleFunctiongetDouble in interface Long2DoubleMapkey - the key that is searched forpublic double remLong(long key)
Long2DoubleMapremLong in interface Long2DoubleMapkey - the element that should be removedpublic double remLongOrDefault(long key,
double defaultValue)
Long2DoubleMapremLongOrDefault in interface Long2DoubleMapkey - 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,
double value)
Long2DoubleMapremove in interface Long2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
double oldValue,
double newValue)
Long2DoubleMapreplace in interface Long2DoubleMapreplace in class AbstractLong2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(long key,
double value)
Long2DoubleMapreplace in interface Long2DoubleMapreplace in class AbstractLong2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public void replaceDoubles(Long2DoubleMap m)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapreplaceDoubles in class AbstractLong2DoubleMapm - elements that should be replaced.public void replaceDoubles(LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapreplaceDoubles in class AbstractLong2DoubleMapmappingFunction - operation to replace all valuespublic double computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDouble in interface Long2DoubleMapcomputeDouble in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
Long2DoubleMapcomputeDoubleIfAbsent in interface Long2DoubleMapcomputeDoubleIfAbsent in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDoubleIfPresent in interface Long2DoubleMapcomputeDoubleIfPresent in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeDouble in interface Long2DoubleMapmergeDouble in class AbstractLong2DoubleMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllDouble(Long2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeAllDouble in interface Long2DoubleMapmergeAllDouble in class AbstractLong2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic double getOrDefault(long key,
double defaultValue)
Long2DoubleMapgetOrDefault in interface Long2DoubleMapgetOrDefault in class AbstractLong2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongDoubleConsumer action)
Long2DoubleMapforEach in interface Long2DoubleMapforEach in class AbstractLong2DoubleMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Double>size in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Double>keySet in interface Long2DoubleMapkeySet in class AbstractLong2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Double>values in interface Long2DoubleMapvalues in class AbstractLong2DoubleMappublic ObjectSet<Long2DoubleMap.Entry> long2DoubleEntrySet()
Long2DoubleMaplong2DoubleEntrySet in interface Long2DoubleMap@Deprecated public java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Double>get in interface Long2DoubleMapget in class AbstractLong2DoubleMap@Deprecated
public java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Double>getOrDefault in interface Long2DoubleMapgetOrDefault in class AbstractLong2DoubleMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Double>containsValue in interface Long2DoubleMapcontainsValue in class java.util.AbstractMap<java.lang.Long,java.lang.Double>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.Double>containsKey in interface Long2DoubleMapcontainsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Double>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Double put(java.lang.Long key,
java.lang.Double value)
put in interface java.util.Map<java.lang.Long,java.lang.Double>put in interface Long2DoubleMapput in class java.util.AbstractMap<java.lang.Long,java.lang.Double>@Deprecated public java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,java.lang.Double>remove in interface Long2DoubleMapremove in class java.util.AbstractMap<java.lang.Long,java.lang.Double>key - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Double>@Deprecated
public java.lang.Double putIfAbsent(java.lang.Long key,
java.lang.Double value)
putIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Double>putIfAbsent in interface Long2DoubleMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,java.lang.Double>remove in interface Long2DoubleMapkey - 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.Double oldValue,
java.lang.Double newValue)
replace in interface java.util.Map<java.lang.Long,java.lang.Double>replace in interface Long2DoubleMap@Deprecated
public java.lang.Double replace(java.lang.Long key,
java.lang.Double value)
replace in interface java.util.Map<java.lang.Long,java.lang.Double>replace in interface Long2DoubleMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,java.lang.Double>replaceAll in interface Long2DoubleMap@Deprecated
public java.lang.Double compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
compute in interface java.util.Map<java.lang.Long,java.lang.Double>compute in interface Long2DoubleMap@Deprecated
public java.lang.Double computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Double> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Double>computeIfAbsent in interface Long2DoubleMap@Deprecated
public java.lang.Double computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,java.lang.Double>computeIfPresent in interface Long2DoubleMap@Deprecated
public java.lang.Double merge(java.lang.Long key,
java.lang.Double value,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
merge in interface java.util.Map<java.lang.Long,java.lang.Double>merge in interface Long2DoubleMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Double> action)
forEach in interface java.util.Map<java.lang.Long,java.lang.Double>forEach in interface Long2DoubleMap