public static class Char2ByteMaps.SynchronizedMap 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.
|
void |
addToAll(Char2ByteMap m)
A Helper method to bulk add primitives together.
|
ObjectSet<Char2ByteMap.Entry> |
char2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear()
Deprecated.
|
java.lang.Byte |
compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
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
|
java.lang.Byte |
computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
java.lang.Byte |
computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(byte value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Char2ByteMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Byte> action)
Deprecated.
|
void |
forEach(CharByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
byte |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Byte |
get(java.lang.Object key)
Deprecated.
|
byte |
getDefaultReturnValue()
Method to see what the default return value is.
|
byte |
getOrDefault(char key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Byte |
getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
Deprecated.
|
CharSet |
keySet() |
java.lang.Byte |
merge(java.lang.Character key,
java.lang.Byte value,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
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
|
java.lang.Byte |
put(java.lang.Character key,
java.lang.Byte value)
Deprecated.
|
byte |
put(char key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(char[] keys,
byte[] 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(Char2ByteMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Byte> m) |
void |
putAllIfAbsent(Char2ByteMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Byte |
putIfAbsent(java.lang.Character key,
java.lang.Byte value)
Deprecated.
|
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
|
java.lang.Byte |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
byte |
removeOrDefault(char key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Byte |
replace(java.lang.Character key,
java.lang.Byte value)
Deprecated.
|
boolean |
replace(java.lang.Character key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
Deprecated.
|
byte |
replace(char key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
byte oldValue,
byte newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
Deprecated.
|
void |
replaceBytes(Char2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(CharByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractChar2ByteMap |
setDefaultReturnValue(byte v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
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() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic byte getDefaultReturnValue()
Char2ByteMapgetDefaultReturnValue in interface Char2ByteMapgetDefaultReturnValue in class AbstractChar2ByteMappublic AbstractChar2ByteMap setDefaultReturnValue(byte v)
Char2ByteMapsetDefaultReturnValue in interface Char2ByteMapsetDefaultReturnValue in class AbstractChar2ByteMapv - value that should be the default return valuepublic 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 void putAllIfAbsent(Char2ByteMap m)
Char2ByteMapputAllIfAbsent in interface Char2ByteMapputAllIfAbsent in class AbstractChar2ByteMapm - elements that should be added if not present.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 void addToAll(Char2ByteMap m)
Char2ByteMapaddToAll in interface Char2ByteMapaddToAll in class AbstractChar2ByteMapm - the values that should be added/insertedpublic void putAll(Char2ByteMap m)
Char2ByteMapputAll in interface Char2ByteMapputAll in class AbstractChar2ByteMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Byte> m)
putAll in interface java.util.Map<java.lang.Character,java.lang.Byte>putAll in class AbstractChar2ByteMappublic void putAll(char[] keys,
byte[] values,
int offset,
int size)
Char2ByteMapputAll in interface Char2ByteMapputAll in class AbstractChar2ByteMapkeys - 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(char key)
Char2ByteMapcontainsKey in interface Char2ByteMapcontainsKey in class AbstractChar2ByteMapkey - element that is searched forpublic boolean containsValue(byte value)
Char2ByteMapcontainsValue in interface Char2ByteMapcontainsValue in class AbstractChar2ByteMapvalue - element that is searched forpublic byte get(char key)
Char2ByteMapget in interface Char2ByteFunctionget in interface Char2ByteMapkey - the key that is searched forpublic 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 boolean replace(char key,
byte oldValue,
byte newValue)
Char2ByteMapreplace in interface Char2ByteMapreplace in class AbstractChar2ByteMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(char key,
byte value)
Char2ByteMapreplace in interface Char2ByteMapreplace in class AbstractChar2ByteMapkey - the element that should be searched forvalue - the value to replace with.public void replaceBytes(Char2ByteMap m)
Char2ByteMapreplaceBytes in interface Char2ByteMapreplaceBytes in class AbstractChar2ByteMapm - elements that should be replaced.public void replaceBytes(CharByteUnaryOperator mappingFunction)
Char2ByteMapreplaceBytes in interface Char2ByteMapreplaceBytes in class AbstractChar2ByteMapmappingFunction - operation to replace all valuespublic 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 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 void forEach(CharByteConsumer action)
Char2ByteMapforEach in interface Char2ByteMapforEach in class AbstractChar2ByteMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Character,java.lang.Byte>size in class java.util.AbstractMap<java.lang.Character,java.lang.Byte>public Char2ByteMap 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()
Char2ByteMapchar2ByteEntrySet in interface Char2ByteMap@Deprecated public java.lang.Byte get(java.lang.Object key)
get in interface java.util.Map<java.lang.Character,java.lang.Byte>get in interface Char2ByteMapget in class AbstractChar2ByteMap@Deprecated
public java.lang.Byte getOrDefault(java.lang.Object key,
java.lang.Byte defaultValue)
getOrDefault in interface java.util.Map<java.lang.Character,java.lang.Byte>getOrDefault in interface Char2ByteMapgetOrDefault in class AbstractChar2ByteMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Character,java.lang.Byte>containsValue in interface Char2ByteMapcontainsValue in class java.util.AbstractMap<java.lang.Character,java.lang.Byte>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,java.lang.Byte>containsKey in interface Char2ByteMapcontainsKey in class java.util.AbstractMap<java.lang.Character,java.lang.Byte>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Byte put(java.lang.Character key,
java.lang.Byte value)
put in interface java.util.Map<java.lang.Character,java.lang.Byte>put in interface Char2ByteMapput in class AbstractChar2ByteMap@Deprecated public java.lang.Byte remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,java.lang.Byte>remove in interface Char2ByteMapremove in class AbstractChar2ByteMapkey - the element that should be removedMap.remove(Object)@Deprecated public 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>@Deprecated
public java.lang.Byte putIfAbsent(java.lang.Character key,
java.lang.Byte value)
putIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Byte>putIfAbsent in interface Char2ByteMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Character,java.lang.Byte>remove in interface Char2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Character key,
java.lang.Byte oldValue,
java.lang.Byte newValue)
replace in interface java.util.Map<java.lang.Character,java.lang.Byte>replace in interface Char2ByteMap@Deprecated
public java.lang.Byte replace(java.lang.Character key,
java.lang.Byte value)
replace in interface java.util.Map<java.lang.Character,java.lang.Byte>replace in interface Char2ByteMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Character,java.lang.Byte>replaceAll in interface Char2ByteMap@Deprecated
public java.lang.Byte compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
compute in interface java.util.Map<java.lang.Character,java.lang.Byte>compute in interface Char2ByteMap@Deprecated
public java.lang.Byte computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Byte> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Byte>computeIfAbsent in interface Char2ByteMap@Deprecated
public java.lang.Byte computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Character,java.lang.Byte>computeIfPresent in interface Char2ByteMap@Deprecated
public java.lang.Byte merge(java.lang.Character key,
java.lang.Byte value,
java.util.function.BiFunction<? super java.lang.Byte,? super java.lang.Byte,? extends java.lang.Byte> mappingFunction)
merge in interface java.util.Map<java.lang.Character,java.lang.Byte>merge in interface Char2ByteMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Byte> action)
forEach in interface java.util.Map<java.lang.Character,java.lang.Byte>forEach in interface Char2ByteMap