public static class Char2IntMaps.SingletonMap extends AbstractChar2IntMap
AbstractChar2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2IntMap.BuilderCache, Char2IntMap.Entry, Char2IntMap.FastEntrySet, Char2IntMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
int |
addTo(char key,
int value)
A Helper method to add a primitives together.
|
ObjectSet<Char2IntMap.Entry> |
char2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
computeInt(char key,
CharIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(char key,
Char2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(char key,
CharIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2IntMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
int |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(char key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllInt(Char2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(char key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
int |
put(char key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(char key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(char key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
subFrom(char key,
int value)
A Helper method to subtract from primitive from each other.
|
int |
supplyIntIfAbsent(char key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
IntCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsInt, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic int put(char key,
int value)
Char2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(char key,
int value)
Char2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(char key,
int value)
Char2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(char key,
int value)
Char2IntMapChar2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic int remove(char key)
Char2IntMapkey - the element that should be removedpublic int removeOrDefault(char key,
int defaultValue)
Char2IntMapkey - 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,
int value)
Char2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int get(char key)
Char2IntMapkey - the key that is searched forpublic int getOrDefault(char key,
int defaultValue)
Char2IntMapgetOrDefault in interface Char2IntMapgetOrDefault in class AbstractChar2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int computeInt(char key,
CharIntUnaryOperator mappingFunction)
Char2IntMapcomputeInt in interface Char2IntMapcomputeInt in class AbstractChar2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(char key,
Char2IntFunction mappingFunction)
Char2IntMapcomputeIntIfAbsent in interface Char2IntMapcomputeIntIfAbsent in class AbstractChar2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(char key,
CharIntUnaryOperator mappingFunction)
Char2IntMapcomputeIntIfPresent in interface Char2IntMapcomputeIntIfPresent in class AbstractChar2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int supplyIntIfAbsent(char key,
IntSupplier valueProvider)
Char2IntMapsupplyIntIfAbsent in interface Char2IntMapsupplyIntIfAbsent in class AbstractChar2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int mergeInt(char key,
int value,
IntIntUnaryOperator mappingFunction)
Char2IntMapmergeInt in interface Char2IntMapmergeInt in class AbstractChar2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Char2IntMap m, IntIntUnaryOperator mappingFunction)
Char2IntMapmergeAllInt in interface Char2IntMapmergeAllInt in class AbstractChar2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Char2IntMaps.SingletonMap copy()
Char2IntMapcopy in interface Char2IntMapcopy in class AbstractChar2IntMappublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Integer>keySet in interface Char2IntMapkeySet in class AbstractChar2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Integer>values in interface Char2IntMapvalues in class AbstractChar2IntMappublic ObjectSet<Char2IntMap.Entry> char2IntEntrySet()
Char2IntMap