public static class Byte2CharMaps.SynchronizedMap extends AbstractByte2CharMap implements Byte2CharMap
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.
|
void |
addToAll(Byte2CharMap m)
A Helper method to bulk add primitives together.
|
ObjectSet<Byte2CharMap.Entry> |
byte2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear()
Deprecated.
|
java.lang.Character |
compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
Deprecated.
|
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
|
java.lang.Character |
computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Character> mappingFunction)
Deprecated.
|
java.lang.Character |
computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
Deprecated.
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(char value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Byte2CharMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Byte,? super java.lang.Character> action)
Deprecated.
|
void |
forEach(ByteCharConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Character |
get(java.lang.Object key)
Deprecated.
|
char |
getDefaultReturnValue()
Method to see what the default return value is.
|
char |
getOrDefault(byte key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Character |
getOrDefault(java.lang.Object key,
java.lang.Character defaultValue)
Deprecated.
|
ByteSet |
keySet() |
java.lang.Character |
merge(java.lang.Byte key,
java.lang.Character value,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
Deprecated.
|
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
|
java.lang.Character |
put(java.lang.Byte key,
java.lang.Character value)
Deprecated.
|
void |
putAll(byte[] keys,
char[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Byte2CharMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> m) |
void |
putAllIfAbsent(Byte2CharMap m)
Type-Specific bulk put method put elements into the map if not present.
|
char |
putIfAbsent(byte key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Character |
putIfAbsent(java.lang.Byte key,
java.lang.Character value)
Deprecated.
|
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
|
java.lang.Character |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
char |
removeOrDefault(byte key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
char |
replace(byte key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Character |
replace(java.lang.Byte key,
java.lang.Character value)
Deprecated.
|
boolean |
replace(java.lang.Byte key,
java.lang.Character oldValue,
java.lang.Character newValue)
Deprecated.
|
boolean |
replace(byte key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
Deprecated.
|
void |
replaceChars(Byte2CharMap m)
Type-Specific bulk replace method.
|
void |
replaceChars(ByteCharUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractByte2CharMap |
setDefaultReturnValue(char v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
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() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic char getDefaultReturnValue()
Byte2CharMapgetDefaultReturnValue in interface Byte2CharMapgetDefaultReturnValue in class AbstractByte2CharMappublic AbstractByte2CharMap setDefaultReturnValue(char v)
Byte2CharMapsetDefaultReturnValue in interface Byte2CharMapsetDefaultReturnValue in class AbstractByte2CharMapv - value that should be the default return valuepublic char put(byte key,
char value)
Byte2CharMapput in interface Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(byte key,
char value)
Byte2CharMapputIfAbsent in interface Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Byte2CharMap m)
Byte2CharMapputAllIfAbsent in interface Byte2CharMapputAllIfAbsent in class AbstractByte2CharMapm - elements that should be added if not present.public char addTo(byte key,
char value)
Byte2CharMapaddTo in interface 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 removedsubFrom in interface Byte2CharMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Byte2CharMap m)
Byte2CharMapaddToAll in interface Byte2CharMapaddToAll in class AbstractByte2CharMapm - the values that should be added/insertedpublic void putAll(Byte2CharMap m)
Byte2CharMapputAll in interface Byte2CharMapputAll in class AbstractByte2CharMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> m)
putAll in interface java.util.Map<java.lang.Byte,java.lang.Character>putAll in class AbstractByte2CharMappublic void putAll(byte[] keys,
char[] values,
int offset,
int size)
Byte2CharMapputAll in interface Byte2CharMapputAll in class AbstractByte2CharMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsKey(byte key)
Byte2CharMapcontainsKey in interface Byte2CharMapcontainsKey in class AbstractByte2CharMapkey - element that is searched forpublic boolean containsValue(char value)
Byte2CharMapcontainsValue in interface Byte2CharMapcontainsValue in class AbstractByte2CharMapvalue - element that is searched forpublic char get(byte key)
Byte2CharMapget in interface Byte2CharFunctionget in interface Byte2CharMapkey - the key that is searched forpublic char remove(byte key)
Byte2CharMapremove in interface Byte2CharMapkey - the element that should be removedpublic char removeOrDefault(byte key,
char defaultValue)
Byte2CharMapremoveOrDefault in interface 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)
Byte2CharMapremove in interface Byte2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
char oldValue,
char newValue)
Byte2CharMapreplace in interface Byte2CharMapreplace in class AbstractByte2CharMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(byte key,
char value)
Byte2CharMapreplace in interface Byte2CharMapreplace in class AbstractByte2CharMapkey - the element that should be searched forvalue - the value to replace with.public void replaceChars(Byte2CharMap m)
Byte2CharMapreplaceChars in interface Byte2CharMapreplaceChars in class AbstractByte2CharMapm - elements that should be replaced.public void replaceChars(ByteCharUnaryOperator mappingFunction)
Byte2CharMapreplaceChars in interface Byte2CharMapreplaceChars in class AbstractByte2CharMapmappingFunction - operation to replace all valuespublic 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 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 void forEach(ByteCharConsumer action)
Byte2CharMapforEach in interface Byte2CharMapforEach in class AbstractByte2CharMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Character>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>public Byte2CharMap 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()
Byte2CharMapbyte2CharEntrySet in interface Byte2CharMap@Deprecated public java.lang.Character get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Character>get in interface Byte2CharMapget in class AbstractByte2CharMap@Deprecated
public java.lang.Character getOrDefault(java.lang.Object key,
java.lang.Character defaultValue)
getOrDefault in interface java.util.Map<java.lang.Byte,java.lang.Character>getOrDefault in interface Byte2CharMapgetOrDefault in class AbstractByte2CharMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Byte,java.lang.Character>containsValue in interface Byte2CharMapcontainsValue in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Byte,java.lang.Character>containsKey in interface Byte2CharMapcontainsKey in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Character put(java.lang.Byte key,
java.lang.Character value)
put in interface java.util.Map<java.lang.Byte,java.lang.Character>put in interface Byte2CharMapput in class AbstractByte2CharMap@Deprecated public java.lang.Character remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,java.lang.Character>remove in interface Byte2CharMapremove in class AbstractByte2CharMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Character>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>@Deprecated
public java.lang.Character putIfAbsent(java.lang.Byte key,
java.lang.Character value)
putIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Character>putIfAbsent in interface Byte2CharMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Byte,java.lang.Character>remove in interface Byte2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Byte key,
java.lang.Character oldValue,
java.lang.Character newValue)
replace in interface java.util.Map<java.lang.Byte,java.lang.Character>replace in interface Byte2CharMap@Deprecated
public java.lang.Character replace(java.lang.Byte key,
java.lang.Character value)
replace in interface java.util.Map<java.lang.Byte,java.lang.Character>replace in interface Byte2CharMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Byte,java.lang.Character>replaceAll in interface Byte2CharMap@Deprecated
public java.lang.Character compute(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
compute in interface java.util.Map<java.lang.Byte,java.lang.Character>compute in interface Byte2CharMap@Deprecated
public java.lang.Character computeIfAbsent(java.lang.Byte key,
java.util.function.Function<? super java.lang.Byte,? extends java.lang.Character> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Byte,java.lang.Character>computeIfAbsent in interface Byte2CharMap@Deprecated
public java.lang.Character computeIfPresent(java.lang.Byte key,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Byte,java.lang.Character>computeIfPresent in interface Byte2CharMap@Deprecated
public java.lang.Character merge(java.lang.Byte key,
java.lang.Character value,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
merge in interface java.util.Map<java.lang.Byte,java.lang.Character>merge in interface Byte2CharMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Byte,? super java.lang.Character> action)
forEach in interface java.util.Map<java.lang.Byte,java.lang.Character>forEach in interface Byte2CharMap