public static class Int2CharMaps.UnmodifyableMap extends AbstractInt2CharMap implements Int2CharMap
AbstractInt2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2CharMap.BuilderCache, Int2CharMap.Entry, Int2CharMap.FastEntrySet, Int2CharMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
char |
addTo(int key,
char value)
A Helper method to add a primitives together.
|
void |
clear() |
char |
computeChar(int key,
IntCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(int key,
Int2CharFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(int key,
IntCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Int2CharMap |
copy()
A Function that does a shallow clone of the Map itself.
|
char |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getOrDefault(int key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2CharMap.Entry> |
int2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
void |
mergeAllChar(Int2CharMap m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(int key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
char |
put(int key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(int key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
removeOrDefault(int key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceChars(Int2CharMap m)
Type-Specific bulk replace method.
|
void |
replaceChars(IntCharUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
char |
subFrom(int key,
char value)
A Helper method to subtract from primitive from each other.
|
char |
supplyCharIfAbsent(int key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
CharCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, 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 char put(int key,
char value)
Int2CharMapput in interface Int2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(int key,
char value)
Int2CharMapputIfAbsent in interface Int2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(int key,
char value)
Int2CharMapaddTo in interface Int2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(int key,
char value)
Int2CharMapInt2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2CharMapkey - that should be subtract fromvalue - that should be subtractpublic char remove(int key)
Int2CharMapremove in interface Int2CharMapkey - the element that should be removedpublic char removeOrDefault(int key,
char defaultValue)
Int2CharMapremoveOrDefault in interface Int2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
char value)
Int2CharMapremove in interface Int2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public char get(int key)
Int2CharMapget in interface Int2CharFunctionget in interface Int2CharMapkey - the key that is searched forpublic char getOrDefault(int key,
char defaultValue)
Int2CharMapgetOrDefault in interface Int2CharMapgetOrDefault in class AbstractInt2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char computeChar(int key,
IntCharUnaryOperator mappingFunction)
Int2CharMapcomputeChar in interface Int2CharMapcomputeChar in class AbstractInt2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(int key,
Int2CharFunction mappingFunction)
Int2CharMapcomputeCharIfAbsent in interface Int2CharMapcomputeCharIfAbsent in class AbstractInt2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char computeCharIfPresent(int key,
IntCharUnaryOperator mappingFunction)
Int2CharMapcomputeCharIfPresent in interface Int2CharMapcomputeCharIfPresent in class AbstractInt2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char supplyCharIfAbsent(int key,
CharSupplier valueProvider)
Int2CharMapsupplyCharIfAbsent in interface Int2CharMapsupplyCharIfAbsent in class AbstractInt2CharMapkey - the key that should be computedvalueProvider - the value if not presentpublic char mergeChar(int key,
char value,
CharCharUnaryOperator mappingFunction)
Int2CharMapmergeChar in interface Int2CharMapmergeChar in class AbstractInt2CharMapkey - 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(Int2CharMap m, CharCharUnaryOperator mappingFunction)
Int2CharMapmergeAllChar in interface Int2CharMapmergeAllChar in class AbstractInt2CharMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceChars(IntCharUnaryOperator mappingFunction)
Int2CharMapreplaceChars in interface Int2CharMapreplaceChars in class AbstractInt2CharMapmappingFunction - operation to replace all valuespublic void replaceChars(Int2CharMap m)
Int2CharMapreplaceChars in interface Int2CharMapreplaceChars in class AbstractInt2CharMapm - elements that should be replaced.public Int2CharMap copy()
Int2CharMapcopy in interface Int2CharMapcopy in class AbstractInt2CharMappublic void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Character>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Character>public IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Character>keySet in interface Int2CharMapkeySet in class AbstractInt2CharMappublic CharCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Character>values in interface Int2CharMapvalues in class AbstractInt2CharMappublic ObjectSet<Int2CharMap.Entry> int2CharEntrySet()
Int2CharMapint2CharEntrySet in interface Int2CharMap