public static class Byte2CharMaps.SingletonMap extends AbstractByte2CharMap
AbstractByte2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2CharMap.BuilderCache, Byte2CharMap.Entry, Byte2CharMap.FastEntrySet, Byte2CharMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
char |
addTo(byte key,
char value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2CharMap.Entry> |
byte2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
char |
computeChar(byte key,
ByteCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(byte key,
Byte2CharFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(byte key,
ByteCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Byte2CharMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
char |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getOrDefault(byte key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteSet |
keySet() |
void |
mergeAllChar(Byte2CharMap m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(byte key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
char |
put(byte key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(byte key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
removeOrDefault(byte key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
char |
subFrom(byte key,
char value)
A Helper method to subtract from primitive from each other.
|
char |
supplyCharIfAbsent(byte key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
CharCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceChars, replaceChars, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsChar, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic char put(byte key,
char value)
Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(byte key,
char value)
Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(byte key,
char value)
Byte2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(byte key,
char value)
Byte2CharMapByte2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic char remove(byte key)
Byte2CharMapkey - the element that should be removedpublic char removeOrDefault(byte key,
char defaultValue)
Byte2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
char value)
Byte2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public char get(byte key)
Byte2CharMapkey - the key that is searched forpublic char getOrDefault(byte key,
char defaultValue)
Byte2CharMapgetOrDefault in interface Byte2CharMapgetOrDefault in class AbstractByte2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char computeChar(byte key,
ByteCharUnaryOperator mappingFunction)
Byte2CharMapcomputeChar in interface Byte2CharMapcomputeChar in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(byte key,
Byte2CharFunction mappingFunction)
Byte2CharMapcomputeCharIfAbsent in interface Byte2CharMapcomputeCharIfAbsent in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char computeCharIfPresent(byte key,
ByteCharUnaryOperator mappingFunction)
Byte2CharMapcomputeCharIfPresent in interface Byte2CharMapcomputeCharIfPresent in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char supplyCharIfAbsent(byte key,
CharSupplier valueProvider)
Byte2CharMapsupplyCharIfAbsent in interface Byte2CharMapsupplyCharIfAbsent in class AbstractByte2CharMapkey - the key that should be computedvalueProvider - the value if not presentpublic char mergeChar(byte key,
char value,
CharCharUnaryOperator mappingFunction)
Byte2CharMapmergeChar in interface Byte2CharMapmergeChar in class AbstractByte2CharMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllChar(Byte2CharMap m, CharCharUnaryOperator mappingFunction)
Byte2CharMapmergeAllChar in interface Byte2CharMapmergeAllChar in class AbstractByte2CharMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Byte2CharMaps.SingletonMap copy()
Byte2CharMapcopy in interface Byte2CharMapcopy in class AbstractByte2CharMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Character>keySet in interface Byte2CharMapkeySet in class AbstractByte2CharMappublic CharCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Character>values in interface Byte2CharMapvalues in class AbstractByte2CharMappublic ObjectSet<Byte2CharMap.Entry> byte2CharEntrySet()
Byte2CharMap