public static class Int2DoubleMaps.SynchronizedMap extends AbstractInt2DoubleMap implements Int2DoubleMap
AbstractInt2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2DoubleMap.BuilderCache, Int2DoubleMap.Entry, Int2DoubleMap.FastEntrySet, Int2DoubleMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
double |
addTo(int key,
double value)
A Helper method to add a primitives together.
|
void |
addToAll(Int2DoubleMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Double |
compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
double |
computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Double |
computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Double> mappingFunction)
Deprecated.
|
java.lang.Double |
computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
boolean |
containsKey(int 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.
|
Int2DoubleMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Double> action)
Deprecated.
|
void |
forEach(IntDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
double |
get(int key)
A Type Specific get 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 |
getOrDefault(int 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.
|
ObjectSet<Int2DoubleMap.Entry> |
int2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
java.lang.Double |
merge(java.lang.Integer 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(Int2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
double |
put(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Double |
put(java.lang.Integer key,
java.lang.Double value)
Deprecated.
|
void |
putAll(int[] 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(Int2DoubleMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> m) |
void |
putAllIfAbsent(Int2DoubleMap m)
Type-Specific bulk put method put elements into the map if not present.
|
double |
putIfAbsent(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Double |
putIfAbsent(java.lang.Integer key,
java.lang.Double value)
Deprecated.
|
double |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int 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 |
removeOrDefault(int key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
replace(int key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
java.lang.Double |
replace(java.lang.Integer key,
java.lang.Double value)
Deprecated.
|
boolean |
replace(java.lang.Integer key,
java.lang.Double oldValue,
java.lang.Double newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
void |
replaceDoubles(Int2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(IntDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractInt2DoubleMap |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
double |
subFrom(int key,
double value)
A Helper method to subtract from primitive from each other.
|
double |
supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiableapplyAsDoublepublic double getDefaultReturnValue()
Int2DoubleMapgetDefaultReturnValue in interface Int2DoubleMapgetDefaultReturnValue in class AbstractInt2DoubleMappublic AbstractInt2DoubleMap setDefaultReturnValue(double v)
Int2DoubleMapsetDefaultReturnValue in interface Int2DoubleMapsetDefaultReturnValue in class AbstractInt2DoubleMapv - value that should be the default return valuepublic double put(int key,
double value)
Int2DoubleMapput in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(int key,
double value)
Int2DoubleMapputIfAbsent in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Int2DoubleMap m)
Int2DoubleMapputAllIfAbsent in interface Int2DoubleMapputAllIfAbsent in class AbstractInt2DoubleMapm - elements that should be added if not present.public double addTo(int key,
double value)
Int2DoubleMapaddTo in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(int key,
double value)
Int2DoubleMapInt2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Int2DoubleMap m)
Int2DoubleMapaddToAll in interface Int2DoubleMapaddToAll in class AbstractInt2DoubleMapm - the values that should be added/insertedpublic void putAll(Int2DoubleMap m)
Int2DoubleMapputAll in interface Int2DoubleMapputAll in class AbstractInt2DoubleMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> m)
putAll in interface java.util.Map<java.lang.Integer,java.lang.Double>putAll in class AbstractInt2DoubleMappublic void putAll(int[] keys,
double[] values,
int offset,
int size)
Int2DoubleMapputAll in interface Int2DoubleMapputAll in class AbstractInt2DoubleMapkeys - 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(int key)
Int2DoubleMapcontainsKey in interface Int2DoubleMapcontainsKey in class AbstractInt2DoubleMapkey - element that is searched forpublic boolean containsValue(double value)
Int2DoubleMapcontainsValue in interface Int2DoubleMapcontainsValue in class AbstractInt2DoubleMapvalue - element that is searched forpublic double get(int key)
Int2DoubleMapget in interface Int2DoubleFunctionget in interface Int2DoubleMapkey - the key that is searched forpublic double remove(int key)
Int2DoubleMapremove in interface Int2DoubleMapkey - the element that should be removedpublic double removeOrDefault(int key,
double defaultValue)
Int2DoubleMapremoveOrDefault in interface Int2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
double value)
Int2DoubleMapremove in interface Int2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
double oldValue,
double newValue)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(int key,
double value)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public void replaceDoubles(Int2DoubleMap m)
Int2DoubleMapreplaceDoubles in interface Int2DoubleMapreplaceDoubles in class AbstractInt2DoubleMapm - elements that should be replaced.public void replaceDoubles(IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapreplaceDoubles in interface Int2DoubleMapreplaceDoubles in class AbstractInt2DoubleMapmappingFunction - operation to replace all valuespublic double computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDouble in interface Int2DoubleMapcomputeDouble in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
Int2DoubleMapcomputeDoubleIfAbsent in interface Int2DoubleMapcomputeDoubleIfAbsent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDoubleIfPresent in interface Int2DoubleMapcomputeDoubleIfPresent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
Int2DoubleMapsupplyDoubleIfAbsent in interface Int2DoubleMapsupplyDoubleIfAbsent in class AbstractInt2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeDouble in interface Int2DoubleMapmergeDouble in class AbstractInt2DoubleMapkey - 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(Int2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeAllDouble in interface Int2DoubleMapmergeAllDouble in class AbstractInt2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic double getOrDefault(int key,
double defaultValue)
Int2DoubleMapgetOrDefault in interface Int2DoubleMapgetOrDefault in class AbstractInt2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(IntDoubleConsumer action)
Int2DoubleMapforEach in interface Int2DoubleMapforEach in class AbstractInt2DoubleMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Double>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public Int2DoubleMap copy()
Int2DoubleMapcopy in interface Int2DoubleMapcopy in class AbstractInt2DoubleMappublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Double>keySet in interface Int2DoubleMapkeySet in class AbstractInt2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Double>values in interface Int2DoubleMapvalues in class AbstractInt2DoubleMappublic ObjectSet<Int2DoubleMap.Entry> int2DoubleEntrySet()
Int2DoubleMapint2DoubleEntrySet in interface Int2DoubleMap@Deprecated public java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<java.lang.Integer,java.lang.Double>get in interface Int2DoubleMapget in class AbstractInt2DoubleMap@Deprecated
public java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<java.lang.Integer,java.lang.Double>getOrDefault in interface Int2DoubleMapgetOrDefault in class AbstractInt2DoubleMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Integer,java.lang.Double>containsValue in interface Int2DoubleMapcontainsValue in class java.util.AbstractMap<java.lang.Integer,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.Integer,java.lang.Double>containsKey in interface Int2DoubleMapcontainsKey in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Double put(java.lang.Integer key,
java.lang.Double value)
put in interface java.util.Map<java.lang.Integer,java.lang.Double>put in interface Int2DoubleMapput in class AbstractInt2DoubleMap@Deprecated public java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,java.lang.Double>remove in interface Int2DoubleMapremove in class AbstractInt2DoubleMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>@Deprecated
public java.lang.Double putIfAbsent(java.lang.Integer key,
java.lang.Double value)
putIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Double>putIfAbsent in interface Int2DoubleMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Integer,java.lang.Double>remove in interface Int2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Integer key,
java.lang.Double oldValue,
java.lang.Double newValue)
replace in interface java.util.Map<java.lang.Integer,java.lang.Double>replace in interface Int2DoubleMap@Deprecated
public java.lang.Double replace(java.lang.Integer key,
java.lang.Double value)
replace in interface java.util.Map<java.lang.Integer,java.lang.Double>replace in interface Int2DoubleMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Integer,java.lang.Double>replaceAll in interface Int2DoubleMap@Deprecated
public java.lang.Double compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
compute in interface java.util.Map<java.lang.Integer,java.lang.Double>compute in interface Int2DoubleMap@Deprecated
public java.lang.Double computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Double> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Double>computeIfAbsent in interface Int2DoubleMap@Deprecated
public java.lang.Double computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Integer,java.lang.Double>computeIfPresent in interface Int2DoubleMap@Deprecated
public java.lang.Double merge(java.lang.Integer 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.Integer,java.lang.Double>merge in interface Int2DoubleMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Double> action)
forEach in interface java.util.Map<java.lang.Integer,java.lang.Double>forEach in interface Int2DoubleMap