T - the type of elements maintained by this Collectionpublic interface Object2CharMap<T> extends java.util.Map<T,java.lang.Character>, Object2CharFunction<T>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Object2CharMap.Entry<T>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Object2CharMap.FastEntrySet<T>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
| Modifier and Type | Method and Description |
|---|---|
char |
addTo(T key,
char value)
A Helper method to add a primitives together.
|
void |
addToAll(Object2CharMap<T> m)
A Helper method to bulk add primitives together.
|
default java.lang.Character |
compute(T key,
java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction) |
char |
computeChar(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(T key,
Object2CharFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default java.lang.Character |
computeIfAbsent(T key,
java.util.function.Function<? super T,? extends java.lang.Character> mappingFunction) |
default java.lang.Character |
computeIfPresent(T key,
java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction) |
boolean |
containsValue(char value)
Type Specific method to reduce boxing/unboxing of values
|
default boolean |
containsValue(java.lang.Object value) |
ObjectSet<java.util.Map.Entry<T,java.lang.Character>> |
entrySet() |
default void |
forEach(java.util.function.BiConsumer<? super T,? super java.lang.Character> action) |
void |
forEach(ObjectCharConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
default java.lang.Character |
get(java.lang.Object key) |
char |
getChar(T key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getDefaultReturnValue()
Method to see what the default return value is.
|
default java.lang.Character |
getOrDefault(java.lang.Object key,
java.lang.Character defaultValue) |
char |
getOrDefault(T key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
default java.lang.Character |
merge(T key,
java.lang.Character value,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Character,? extends java.lang.Character> mappingFunction) |
void |
mergeAllChar(Object2CharMap<T> m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(T key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2CharMap.Entry<T>> |
object2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
char |
put(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
default java.lang.Character |
put(T key,
java.lang.Character value) |
void |
putAll(Object2CharMap<T> m)
Type Specific function for the bull putting of values
|
default void |
putAll(T[] keys,
char[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(T[] 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 |
putAllIfAbsent(Object2CharMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
char |
putIfAbsent(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
default java.lang.Character |
putIfAbsent(T key,
java.lang.Character value) |
char |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
char |
remOrDefault(T key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
default java.lang.Character |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
remove(T key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
replace(T key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
default java.lang.Character |
replace(T key,
java.lang.Character value) |
default boolean |
replace(T key,
java.lang.Character oldValue,
java.lang.Character newValue) |
boolean |
replace(T key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
default void |
replaceAll(java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction) |
void |
replaceChars(Object2CharMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceChars(ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Object2CharMap<T> |
setDefaultReturnValue(char v)
Method to define the default return value if a requested key isn't present
|
CharCollection |
values() |
char getDefaultReturnValue()
Object2CharMap<T> setDefaultReturnValue(char v)
v - value that should be the default return valuechar put(T key, char value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(T[] keys, char[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(T[] keys, char[] values, int offset, int size)
keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)char putIfAbsent(T key, char value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Object2CharMap<T> m)
m - elements that should be added if not present.char addTo(T key, char value)
key - the key that should be inserted,value - the value that should be inserted / addedvoid addToAll(Object2CharMap<T> m)
m - the values that should be added/insertedvoid putAll(Object2CharMap<T> m)
m - the elements that should be insertedboolean containsValue(char value)
value - element that is searched fordefault boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T,java.lang.Character>value - that is searched for.Map.containsValue(Object)char rem(T key)
key - the element that should be removeddefault java.lang.Character remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Character>key - the element that should be removedMap.remove(Object)boolean remove(T key, char value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)default boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<T,java.lang.Character>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)char remOrDefault(T key, char defaultValue)
key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)boolean replace(T key, char oldValue, char newValue)
key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.char replace(T key, char value)
key - the element that should be searched forvalue - the value to replace with.void replaceChars(Object2CharMap<T> m)
m - elements that should be replaced.void replaceChars(ObjectCharUnaryOperator<T> mappingFunction)
mappingFunction - operation to replace all valueschar computeChar(T key, ObjectCharUnaryOperator<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valuechar computeCharIfAbsent(T key, Object2CharFunction<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentchar computeCharIfPresent(T key, ObjectCharUnaryOperator<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentchar mergeChar(T key, char value, CharCharUnaryOperator mappingFunction)
key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuevoid mergeAllChar(Object2CharMap<T> m, CharCharUnaryOperator mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuedefault boolean replace(T key, java.lang.Character oldValue, java.lang.Character newValue)
replace in interface java.util.Map<T,java.lang.Character>default java.lang.Character replace(T key, java.lang.Character value)
replace in interface java.util.Map<T,java.lang.Character>char getChar(T key)
getChar in interface Object2CharFunction<T>key - the key that is searched forchar getOrDefault(T key, char defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentdefault java.lang.Character get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Character>default java.lang.Character getOrDefault(java.lang.Object key,
java.lang.Character defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Character>default void replaceAll(java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
replaceAll in interface java.util.Map<T,java.lang.Character>default java.lang.Character compute(T key, java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
compute in interface java.util.Map<T,java.lang.Character>default java.lang.Character computeIfAbsent(T key, java.util.function.Function<? super T,? extends java.lang.Character> mappingFunction)
computeIfAbsent in interface java.util.Map<T,java.lang.Character>default java.lang.Character computeIfPresent(T key, java.util.function.BiFunction<? super T,? super java.lang.Character,? extends java.lang.Character> mappingFunction)
computeIfPresent in interface java.util.Map<T,java.lang.Character>default java.lang.Character merge(T 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<T,java.lang.Character>void forEach(ObjectCharConsumer<T> action)
action - processor of the values that are iterator overdefault void forEach(java.util.function.BiConsumer<? super T,? super java.lang.Character> action)
forEach in interface java.util.Map<T,java.lang.Character>CharCollection values()
values in interface java.util.Map<T,java.lang.Character>ObjectSet<java.util.Map.Entry<T,java.lang.Character>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Character>ObjectSet<Object2CharMap.Entry<T>> object2CharEntrySet()
default java.lang.Character put(T key, java.lang.Character value)
put in interface java.util.Map<T,java.lang.Character>