public static class Char2ByteMaps.SingletonMap extends AbstractChar2ByteMap
AbstractChar2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ByteMap.BuilderCache, Char2ByteMap.Entry, Char2ByteMap.FastEntrySet, Char2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(char key,
byte value)
A Helper method to add a primitives together.
|
ObjectSet<Char2ByteMap.Entry> |
char2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
computeByte(char key,
CharByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(char key,
Char2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(char key,
CharByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2ByteMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(char key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllByte(Char2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(char key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(char key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(char key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(char key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
subFrom(char key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(char 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(char key,
byte value)
Char2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(char key,
byte value)
Char2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(char key,
byte value)
Char2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(char key,
byte value)
Char2ByteMapChar2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte remove(char key)
Char2ByteMapkey - the element that should be removedpublic byte removeOrDefault(char key,
byte defaultValue)
Char2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(char key,
byte value)
Char2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(char key)
Char2ByteMapkey - the key that is searched forpublic byte getOrDefault(char key,
byte defaultValue)
Char2ByteMapgetOrDefault in interface Char2ByteMapgetOrDefault in class AbstractChar2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(char key,
CharByteUnaryOperator mappingFunction)
Char2ByteMapcomputeByte in interface Char2ByteMapcomputeByte in class AbstractChar2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(char key,
Char2ByteFunction mappingFunction)
Char2ByteMapcomputeByteIfAbsent in interface Char2ByteMapcomputeByteIfAbsent in class AbstractChar2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(char key,
CharByteUnaryOperator mappingFunction)
Char2ByteMapcomputeByteIfPresent in interface Char2ByteMapcomputeByteIfPresent in class AbstractChar2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(char key,
ByteSupplier valueProvider)
Char2ByteMapsupplyByteIfAbsent in interface Char2ByteMapsupplyByteIfAbsent in class AbstractChar2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(char key,
byte value,
ByteByteUnaryOperator mappingFunction)
Char2ByteMapmergeByte in interface Char2ByteMapmergeByte in class AbstractChar2ByteMapkey - 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(Char2ByteMap m, ByteByteUnaryOperator mappingFunction)
Char2ByteMapmergeAllByte in interface Char2ByteMapmergeAllByte in class AbstractChar2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Char2ByteMaps.SingletonMap copy()
Char2ByteMapcopy in interface Char2ByteMapcopy in class AbstractChar2ByteMappublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Byte>keySet in interface Char2ByteMapkeySet in class AbstractChar2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Byte>values in interface Char2ByteMapvalues in class AbstractChar2ByteMappublic ObjectSet<Char2ByteMap.Entry> char2ByteEntrySet()
Char2ByteMap