public static class Char2ByteMaps.UnmodifyableMap extends AbstractChar2ByteMap implements Char2ByteMap
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.
|
void |
clear() |
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
|
Char2ByteMap |
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.
|
void |
replaceBytes(Char2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(CharByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
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, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, applyAsByte, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic byte put(char key,
byte value)
Char2ByteMapput in interface Char2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(char key,
byte value)
Char2ByteMapputIfAbsent in interface Char2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(char key,
byte value)
Char2ByteMapaddTo in interface 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 removedsubFrom in interface Char2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic byte remove(char key)
Char2ByteMapremove in interface Char2ByteMapkey - the element that should be removedpublic byte removeOrDefault(char key,
byte defaultValue)
Char2ByteMapremoveOrDefault in interface 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)
Char2ByteMapremove in interface Char2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(char key)
Char2ByteMapget in interface 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 void replaceBytes(CharByteUnaryOperator mappingFunction)
Char2ByteMapreplaceBytes in interface Char2ByteMapreplaceBytes in class AbstractChar2ByteMapmappingFunction - operation to replace all valuespublic void replaceBytes(Char2ByteMap m)
Char2ByteMapreplaceBytes in interface Char2ByteMapreplaceBytes in class AbstractChar2ByteMapm - elements that should be replaced.public Char2ByteMap copy()
Char2ByteMapcopy in interface Char2ByteMapcopy in class AbstractChar2ByteMappublic void clear()
clear in interface java.util.Map<java.lang.Character,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Character,java.lang.Byte>public 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()
Char2ByteMapchar2ByteEntrySet in interface Char2ByteMap