public static class Short2DoubleMaps.EmptyMap extends AbstractShort2DoubleMap
AbstractShort2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2DoubleMap.BuilderCache, Short2DoubleMap.Entry, Short2DoubleMap.FastEntrySet, Short2DoubleMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(short key,
double value)
A Helper method to add a primitives together.
|
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
|
Short2DoubleMaps.EmptyMap |
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.
|
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, replaceDoubles, replaceDoubles, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsDouble, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic double put(short key,
double value)
Short2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(short key,
double value)
Short2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(short key,
double value)
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 removedkey - that should be subtract fromvalue - that should be subtractpublic double remove(short key)
Short2DoubleMapkey - the element that should be removedpublic double removeOrDefault(short key,
double defaultValue)
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)
Short2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double get(short key)
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 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()
Short2DoubleMappublic Short2DoubleMaps.EmptyMap copy()
Short2DoubleMapcopy in interface Short2DoubleMapcopy in class AbstractShort2DoubleMap