public static class Double2ByteMaps.SingletonMap extends AbstractDouble2ByteMap
AbstractDouble2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ByteMap.BuilderCache, Double2ByteMap.Entry, Double2ByteMap.FastEntrySet, Double2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(double key,
byte value)
A Helper method to add a primitives together.
|
byte |
computeByte(double key,
DoubleByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(double key,
Double2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(double key,
DoubleByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Double2ByteMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2ByteMap.Entry> |
double2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(double key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleSet |
keySet() |
void |
mergeAllByte(Double2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(double key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(double key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(double key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(double key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
subFrom(double key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(double key,
ByteSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ByteCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceBytes, replaceBytes, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic byte put(double key,
byte value)
Double2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(double key,
byte value)
Double2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(double key,
byte value)
Double2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(double key,
byte value)
Double2ByteMapDouble2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte remove(double key)
Double2ByteMapkey - the element that should be removedpublic byte removeOrDefault(double key,
byte defaultValue)
Double2ByteMapkey - 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,
byte value)
Double2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(double key)
Double2ByteMapkey - the key that is searched forpublic byte getOrDefault(double key,
byte defaultValue)
Double2ByteMapgetOrDefault in interface Double2ByteMapgetOrDefault in class AbstractDouble2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(double key,
DoubleByteUnaryOperator mappingFunction)
Double2ByteMapcomputeByte in interface Double2ByteMapcomputeByte in class AbstractDouble2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(double key,
Double2ByteFunction mappingFunction)
Double2ByteMapcomputeByteIfAbsent in interface Double2ByteMapcomputeByteIfAbsent in class AbstractDouble2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(double key,
DoubleByteUnaryOperator mappingFunction)
Double2ByteMapcomputeByteIfPresent in interface Double2ByteMapcomputeByteIfPresent in class AbstractDouble2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(double key,
ByteSupplier valueProvider)
Double2ByteMapsupplyByteIfAbsent in interface Double2ByteMapsupplyByteIfAbsent in class AbstractDouble2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(double key,
byte value,
ByteByteUnaryOperator mappingFunction)
Double2ByteMapmergeByte in interface Double2ByteMapmergeByte in class AbstractDouble2ByteMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllByte(Double2ByteMap m, ByteByteUnaryOperator mappingFunction)
Double2ByteMapmergeAllByte in interface Double2ByteMapmergeAllByte in class AbstractDouble2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Double2ByteMaps.SingletonMap copy()
Double2ByteMapcopy in interface Double2ByteMapcopy in class AbstractDouble2ByteMappublic DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Byte>keySet in interface Double2ByteMapkeySet in class AbstractDouble2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Byte>values in interface Double2ByteMapvalues in class AbstractDouble2ByteMappublic ObjectSet<Double2ByteMap.Entry> double2ByteEntrySet()
Double2ByteMap