public static class Int2CharMaps.EmptyMap extends AbstractInt2CharMap
AbstractInt2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2CharMap.BuilderCache, Int2CharMap.Entry, Int2CharMap.FastEntrySet, Int2CharMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
char |
addTo(int key,
char value)
A Helper method to add a primitives together.
|
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
|
Int2CharMaps.EmptyMap |
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.
|
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, replaceChars, replaceChars, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic char put(int key,
char value)
Int2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(int key,
char value)
Int2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(int key,
char value)
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 removedkey - that should be subtract fromvalue - that should be subtractpublic char remove(int key)
Int2CharMapkey - the element that should be removedpublic char removeOrDefault(int key,
char defaultValue)
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)
Int2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public char get(int key)
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 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()
Int2CharMappublic Int2CharMaps.EmptyMap copy()
Int2CharMapcopy in interface Int2CharMapcopy in class AbstractInt2CharMap