public static class Short2DoubleMaps.UnmodifyableMap extends AbstractShort2DoubleMap implements Short2DoubleMap
AbstractShort2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2DoubleMap.BuilderCache, Short2DoubleMap.Entry, Short2DoubleMap.FastEntrySet, Short2DoubleMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
double |
addTo(short key,
double value)
A Helper method to add a primitives together.
|
void |
clear() |
double |
computeDouble(short key,
ShortDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(short key,
Short2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(short key,
ShortDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Short2DoubleMap |
copy()
A Function that does a shallow clone of the Map itself.
|
double |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(short key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
void |
mergeAllDouble(Short2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(short key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
double |
put(short key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(short key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
removeOrDefault(short key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceDoubles(Short2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(ShortDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
ObjectSet<Short2DoubleMap.Entry> |
short2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
subFrom(short key,
double value)
A Helper method to subtract from primitive from each other.
|
double |
supplyDoubleIfAbsent(short key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic double put(short key,
double value)
Short2DoubleMapput in interface Short2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(short key,
double value)
Short2DoubleMapputIfAbsent in interface Short2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(short key,
double value)
Short2DoubleMapaddTo in interface Short2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(short key,
double value)
Short2DoubleMapShort2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic double remove(short key)
Short2DoubleMapremove in interface Short2DoubleMapkey - the element that should be removedpublic double removeOrDefault(short key,
double defaultValue)
Short2DoubleMapremoveOrDefault in interface Short2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
double value)
Short2DoubleMapremove in interface Short2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double get(short key)
Short2DoubleMapget in interface Short2DoubleFunctionget in interface Short2DoubleMapkey - the key that is searched forpublic double getOrDefault(short key,
double defaultValue)
Short2DoubleMapgetOrDefault in interface Short2DoubleMapgetOrDefault in class AbstractShort2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double computeDouble(short key,
ShortDoubleUnaryOperator mappingFunction)
Short2DoubleMapcomputeDouble in interface Short2DoubleMapcomputeDouble in class AbstractShort2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(short key,
Short2DoubleFunction mappingFunction)
Short2DoubleMapcomputeDoubleIfAbsent in interface Short2DoubleMapcomputeDoubleIfAbsent in class AbstractShort2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(short key,
ShortDoubleUnaryOperator mappingFunction)
Short2DoubleMapcomputeDoubleIfPresent in interface Short2DoubleMapcomputeDoubleIfPresent in class AbstractShort2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double supplyDoubleIfAbsent(short key,
DoubleSupplier valueProvider)
Short2DoubleMapsupplyDoubleIfAbsent in interface Short2DoubleMapsupplyDoubleIfAbsent in class AbstractShort2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double mergeDouble(short key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Short2DoubleMapmergeDouble in interface Short2DoubleMapmergeDouble in class AbstractShort2DoubleMapkey - 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(Short2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Short2DoubleMapmergeAllDouble in interface Short2DoubleMapmergeAllDouble in class AbstractShort2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceDoubles(ShortDoubleUnaryOperator mappingFunction)
Short2DoubleMapreplaceDoubles in interface Short2DoubleMapreplaceDoubles in class AbstractShort2DoubleMapmappingFunction - operation to replace all valuespublic void replaceDoubles(Short2DoubleMap m)
Short2DoubleMapreplaceDoubles in interface Short2DoubleMapreplaceDoubles in class AbstractShort2DoubleMapm - elements that should be replaced.public Short2DoubleMap copy()
Short2DoubleMapcopy in interface Short2DoubleMapcopy in class AbstractShort2DoubleMappublic void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Double>public ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Double>keySet in interface Short2DoubleMapkeySet in class AbstractShort2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Double>values in interface Short2DoubleMapvalues in class AbstractShort2DoubleMappublic ObjectSet<Short2DoubleMap.Entry> short2DoubleEntrySet()
Short2DoubleMapshort2DoubleEntrySet in interface Short2DoubleMap