V - the type of elements maintained by this Collectionpublic static class Char2ObjectMaps.UnmodifyableMap<V> extends AbstractChar2ObjectMap<V> implements Char2ObjectMap<V>
AbstractChar2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ObjectMap.BuilderCache<V>, Char2ObjectMap.Entry<V>, Char2ObjectMap.FastEntrySet<V>, Char2ObjectMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
ObjectSet<Char2ObjectMap.Entry<V>> |
char2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
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
|
Char2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
V |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(char key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
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(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(char key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
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
|
V |
supplyIfAbsent(char key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuebuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic V put(char key, V value)
Char2ObjectMapput in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(char key, V value)
Char2ObjectMapputIfAbsent in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remove(char key)
Char2ObjectMapremove in interface Char2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(char key, V defaultValue)
Char2ObjectMapremoveOrDefault in interface Char2ObjectMap<V>key - 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,
V value)
Char2ObjectMapremove in interface Char2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V get(char key)
Char2ObjectMapget in interface Char2ObjectFunction<V>get in interface Char2ObjectMap<V>key - the key that is searched forpublic V getOrDefault(char key, V defaultValue)
Char2ObjectMapgetOrDefault in interface Char2ObjectMap<V>getOrDefault in class AbstractChar2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V compute(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcompute in interface Char2ObjectMap<V>compute in class AbstractChar2ObjectMap<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>computeIfAbsent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcomputeIfPresent in interface Char2ObjectMap<V>computeIfPresent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V supplyIfAbsent(char key, ObjectSupplier<V> valueProvider)
Char2ObjectMapsupplyIfAbsent in interface Char2ObjectMap<V>supplyIfAbsent in class AbstractChar2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V merge(char key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmerge in interface Char2ObjectMap<V>merge in class AbstractChar2ObjectMap<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>mergeAll in class AbstractChar2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceObjects(CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapreplaceObjects in interface Char2ObjectMap<V>replaceObjects in class AbstractChar2ObjectMap<V>mappingFunction - operation to replace all valuespublic void replaceObjects(Char2ObjectMap<V> m)
Char2ObjectMapreplaceObjects in interface Char2ObjectMap<V>replaceObjects in class AbstractChar2ObjectMap<V>m - elements that should be replaced.public Char2ObjectMap<V> copy()
Char2ObjectMapcopy in interface Char2ObjectMap<V>copy in class AbstractChar2ObjectMap<V>public void clear()
public CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,V>keySet in interface Char2ObjectMap<V>keySet in class AbstractChar2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>values in interface Char2ObjectMap<V>values in class AbstractChar2ObjectMap<V>public ObjectSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
Char2ObjectMapchar2ObjectEntrySet in interface Char2ObjectMap<V>