V - the type of elements maintained by this Collectionpublic abstract class AbstractChar2ObjectMap<V> extends java.util.AbstractMap<java.lang.Character,V> implements Char2ObjectMap<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractChar2ObjectMap.BasicEntry<V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ObjectMap.BuilderCache<V>, Char2ObjectMap.Entry<V>, Char2ObjectMap.FastEntrySet<V>, Char2ObjectMap.MapBuilder| Constructor and Description |
|---|
AbstractChar2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(char key,
Char2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Char2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Character,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(CharObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(char key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
CharSet |
keySet() |
V |
merge(char key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Char2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(java.lang.Character key,
V value)
Deprecated.
|
void |
putAll(char[] keys,
V[] 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(Char2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.lang.Character[] keys,
V[] 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 |
putAll(java.util.Map<? extends java.lang.Character,? extends V> m) |
void |
putAllIfAbsent(Char2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
remove(java.lang.Object key) |
V |
replace(char key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceObjects(Char2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(CharObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractChar2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(char key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
builder, char2ObjectEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, get, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic V getDefaultReturnValue()
Char2ObjectMapgetDefaultReturnValue in interface Char2ObjectMap<V>public AbstractChar2ObjectMap<V> setDefaultReturnValue(V v)
Char2ObjectMapsetDefaultReturnValue in interface Char2ObjectMap<V>v - value that should be the default return valuepublic Char2ObjectMap<V> copy()
Char2ObjectMapcopy in interface Char2ObjectMap<V>@Deprecated public V put(java.lang.Character key, V value)
put in interface java.util.Map<java.lang.Character,V>put in interface Char2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Character,V>public void putAll(Char2ObjectMap<V> m)
Char2ObjectMapputAll in interface Char2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Character,? extends V> m)
public void putAll(char[] keys,
V[] values,
int offset,
int size)
Char2ObjectMapputAll in interface Char2ObjectMap<V>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(java.lang.Character[] keys,
V[] values,
int offset,
int size)
Char2ObjectMapputAll in interface Char2ObjectMap<V>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(Char2ObjectMap<V> m)
Char2ObjectMapputAllIfAbsent in interface Char2ObjectMap<V>m - elements that should be added if not present.public boolean containsKey(char key)
Char2ObjectMapcontainsKey in interface Char2ObjectMap<V>key - element that is searched forpublic boolean containsValue(java.lang.Object value)
public boolean replace(char key,
V oldValue,
V newValue)
Char2ObjectMapreplace in interface Char2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(char key, V value)
Char2ObjectMapreplace in interface Char2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Char2ObjectMap<V> m)
Char2ObjectMapreplaceObjects in interface Char2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapreplaceObjects in interface Char2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcompute in interface Char2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(char key, Char2ObjectFunction<V> mappingFunction)
Char2ObjectMapcomputeIfAbsent in interface Char2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(char key, ObjectSupplier<V> valueProvider)
Char2ObjectMapsupplyIfAbsent in interface Char2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcomputeIfPresent in interface Char2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(char key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmerge in interface Char2ObjectMap<V>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 mergeAll(Char2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmergeAll in interface Char2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Character,V>get in interface Char2ObjectMap<V>get in class java.util.AbstractMap<java.lang.Character,V>public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Character,V>getOrDefault in interface Char2ObjectMap<V>public V getOrDefault(char key, V defaultValue)
Char2ObjectMapgetOrDefault in interface Char2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,V>remove in interface Char2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Character,V>key - the element that should be removedMap.remove(Object)public void forEach(CharObjectConsumer<V> action)
Char2ObjectMapforEach in interface Char2ObjectMap<V>action - processor of the values that are iterator overpublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,V>keySet in interface Char2ObjectMap<V>keySet in class java.util.AbstractMap<java.lang.Character,V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>values in interface Char2ObjectMap<V>values in class java.util.AbstractMap<java.lang.Character,V>public ObjectSet<java.util.Map.Entry<java.lang.Character,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Character,V>entrySet in interface Char2ObjectMap<V>entrySet in class java.util.AbstractMap<java.lang.Character,V>public boolean equals(java.lang.Object o)