T - the keyType of elements maintained by this Collectionpublic abstract class AbstractObject2CharMap<T> extends java.util.AbstractMap<T,java.lang.Character> implements Object2CharMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2CharMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2CharMap.BuilderCache<T>, Object2CharMap.Entry<T>, Object2CharMap.FastEntrySet<T>, Object2CharMap.MapBuilder| Constructor and Description |
|---|
AbstractObject2CharMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Object2CharMap<T> m)
A Helper method to bulk add primitives together.
|
char |
computeChar(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(T key,
ToCharFunction<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
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(char value)
Type Specific method to reduce boxing/unboxing of values
|
Object2CharMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<T,java.lang.Character>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectCharConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Character |
get(java.lang.Object key) |
char |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Character |
getOrDefault(java.lang.Object key,
java.lang.Character defaultValue) |
int |
hashCode() |
ObjectSet<T> |
keySet() |
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
|
java.lang.Character |
put(T key,
java.lang.Character value)
Deprecated.
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Character> m) |
void |
putAll(Object2CharMap<T> m)
Type Specific function for the bull putting of values
|
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 |
putAll(T[] keys,
java.lang.Character[] values,
int offset,
int size)
Type Specific Object 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.
|
java.lang.Character |
remove(java.lang.Object key) |
char |
replace(T key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
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
|
AbstractObject2CharMap<T> |
setDefaultReturnValue(char v)
Method to define the default return value if a requested key isn't present
|
char |
supplyCharIfAbsent(T key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
CharCollection |
values() |
addTo, applyAsChar, builder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getChar, getOrDefault, merge, object2CharEntrySet, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic char getDefaultReturnValue()
Object2CharMapgetDefaultReturnValue in interface Object2CharMap<T>public AbstractObject2CharMap<T> setDefaultReturnValue(char v)
Object2CharMapsetDefaultReturnValue in interface Object2CharMap<T>v - value that should be the default return valuepublic Object2CharMap<T> copy()
Object2CharMapcopy in interface Object2CharMap<T>@Deprecated public java.lang.Character put(T key, java.lang.Character value)
put in interface java.util.Map<T,java.lang.Character>put in interface Object2CharMap<T>put in class java.util.AbstractMap<T,java.lang.Character>public void addToAll(Object2CharMap<T> m)
Object2CharMapaddToAll in interface Object2CharMap<T>m - the values that should be added/insertedpublic void putAll(Object2CharMap<T> m)
Object2CharMapputAll in interface Object2CharMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Character> m)
public void putAll(T[] keys, char[] values, int offset, int size)
Object2CharMapputAll in interface Object2CharMap<T>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 addedMap.putAll(Map)public void putAll(T[] keys, java.lang.Character[] values, int offset, int size)
Object2CharMapputAll in interface Object2CharMap<T>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 addedMap.putAll(Map)public void putAllIfAbsent(Object2CharMap<T> m)
Object2CharMapputAllIfAbsent in interface Object2CharMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(char value)
Object2CharMapcontainsValue in interface Object2CharMap<T>value - element that is searched forpublic boolean replace(T key, char oldValue, char newValue)
Object2CharMapreplace in interface Object2CharMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(T key, char value)
Object2CharMapreplace in interface Object2CharMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceChars(Object2CharMap<T> m)
Object2CharMapreplaceChars in interface Object2CharMap<T>m - elements that should be replaced.public void replaceChars(ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapreplaceChars in interface Object2CharMap<T>mappingFunction - operation to replace all valuespublic char computeChar(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeChar in interface Object2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(T key, ToCharFunction<T> mappingFunction)
Object2CharMapcomputeCharIfAbsent in interface Object2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char supplyCharIfAbsent(T key, CharSupplier valueProvider)
Object2CharMapsupplyCharIfAbsent in interface Object2CharMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic char computeCharIfPresent(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeCharIfPresent in interface Object2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char mergeChar(T key, char value, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeChar in interface Object2CharMap<T>key - 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(Object2CharMap<T> m, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeAllChar in interface Object2CharMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Character get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Character>get in interface Object2CharMap<T>get in class java.util.AbstractMap<T,java.lang.Character>public java.lang.Character getOrDefault(java.lang.Object key,
java.lang.Character defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Character>getOrDefault in interface Object2CharMap<T>public java.lang.Character remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Character>remove in interface Object2CharMap<T>remove in class java.util.AbstractMap<T,java.lang.Character>key - the element that should be removedMap.remove(Object)public void forEach(ObjectCharConsumer<T> action)
Object2CharMapforEach in interface Object2CharMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Character>keySet in interface Object2CharMap<T>keySet in class java.util.AbstractMap<T,java.lang.Character>public CharCollection values()
values in interface java.util.Map<T,java.lang.Character>values in interface Object2CharMap<T>values in class java.util.AbstractMap<T,java.lang.Character>public ObjectSet<java.util.Map.Entry<T,java.lang.Character>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Character>entrySet in interface Object2CharMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Character>public boolean equals(java.lang.Object o)