public static class Double2ShortMaps.SingletonMap extends AbstractDouble2ShortMap
AbstractDouble2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ShortMap.BuilderCache, Double2ShortMap.Entry, Double2ShortMap.FastEntrySet, Double2ShortMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
short |
addTo(double key,
short value)
A Helper method to add a primitives together.
|
short |
computeShort(double key,
DoubleShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(double key,
Double2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(double key,
DoubleShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Double2ShortMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2ShortMap.Entry> |
double2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
short |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getOrDefault(double key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleSet |
keySet() |
void |
mergeAllShort(Double2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(double key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
short |
put(double key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(double key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(double key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
subFrom(double key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(double key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceShorts, replaceShorts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsShort, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic short put(double key,
short value)
Double2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(double key,
short value)
Double2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(double key,
short value)
Double2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(double key,
short value)
Double2ShortMapDouble2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic short remove(double key)
Double2ShortMapkey - the element that should be removedpublic short removeOrDefault(double key,
short defaultValue)
Double2ShortMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(double key,
short value)
Double2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short get(double key)
Double2ShortMapkey - the key that is searched forpublic short getOrDefault(double key,
short defaultValue)
Double2ShortMapgetOrDefault in interface Double2ShortMapgetOrDefault in class AbstractDouble2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short computeShort(double key,
DoubleShortUnaryOperator mappingFunction)
Double2ShortMapcomputeShort in interface Double2ShortMapcomputeShort in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(double key,
Double2ShortFunction mappingFunction)
Double2ShortMapcomputeShortIfAbsent in interface Double2ShortMapcomputeShortIfAbsent in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(double key,
DoubleShortUnaryOperator mappingFunction)
Double2ShortMapcomputeShortIfPresent in interface Double2ShortMapcomputeShortIfPresent in class AbstractDouble2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(double key,
ShortSupplier valueProvider)
Double2ShortMapsupplyShortIfAbsent in interface Double2ShortMapsupplyShortIfAbsent in class AbstractDouble2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(double key,
short value,
ShortShortUnaryOperator mappingFunction)
Double2ShortMapmergeShort in interface Double2ShortMapmergeShort in class AbstractDouble2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Double2ShortMap m, ShortShortUnaryOperator mappingFunction)
Double2ShortMapmergeAllShort in interface Double2ShortMapmergeAllShort in class AbstractDouble2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Double2ShortMaps.SingletonMap copy()
Double2ShortMapcopy in interface Double2ShortMapcopy in class AbstractDouble2ShortMappublic DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Short>keySet in interface Double2ShortMapkeySet in class AbstractDouble2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Short>values in interface Double2ShortMapvalues in class AbstractDouble2ShortMappublic ObjectSet<Double2ShortMap.Entry> double2ShortEntrySet()
Double2ShortMap