public static class Char2ShortMaps.SingletonMap extends AbstractChar2ShortMap
AbstractChar2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ShortMap.BuilderCache, Char2ShortMap.Entry, Char2ShortMap.FastEntrySet, Char2ShortMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
short |
addTo(char key,
short value)
A Helper method to add a primitives together.
|
ObjectSet<Char2ShortMap.Entry> |
char2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
short |
computeShort(char key,
CharShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(char key,
Char2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(char key,
CharShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2ShortMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
short |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getOrDefault(char key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllShort(Char2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(char key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
short |
put(char key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(char key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(char key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
subFrom(char key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(char key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceShorts, replaceShorts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsShort, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic short put(char key,
short value)
Char2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(char key,
short value)
Char2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(char key,
short value)
Char2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(char key,
short value)
Char2ShortMapChar2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic short remove(char key)
Char2ShortMapkey - the element that should be removedpublic short removeOrDefault(char key,
short defaultValue)
Char2ShortMapkey - 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,
short value)
Char2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short get(char key)
Char2ShortMapkey - the key that is searched forpublic short getOrDefault(char key,
short defaultValue)
Char2ShortMapgetOrDefault in interface Char2ShortMapgetOrDefault in class AbstractChar2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short computeShort(char key,
CharShortUnaryOperator mappingFunction)
Char2ShortMapcomputeShort in interface Char2ShortMapcomputeShort in class AbstractChar2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(char key,
Char2ShortFunction mappingFunction)
Char2ShortMapcomputeShortIfAbsent in interface Char2ShortMapcomputeShortIfAbsent in class AbstractChar2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(char key,
CharShortUnaryOperator mappingFunction)
Char2ShortMapcomputeShortIfPresent in interface Char2ShortMapcomputeShortIfPresent in class AbstractChar2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(char key,
ShortSupplier valueProvider)
Char2ShortMapsupplyShortIfAbsent in interface Char2ShortMapsupplyShortIfAbsent in class AbstractChar2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(char key,
short value,
ShortShortUnaryOperator mappingFunction)
Char2ShortMapmergeShort in interface Char2ShortMapmergeShort in class AbstractChar2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Char2ShortMap m, ShortShortUnaryOperator mappingFunction)
Char2ShortMapmergeAllShort in interface Char2ShortMapmergeAllShort in class AbstractChar2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Char2ShortMaps.SingletonMap copy()
Char2ShortMapcopy in interface Char2ShortMapcopy in class AbstractChar2ShortMappublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Short>keySet in interface Char2ShortMapkeySet in class AbstractChar2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Short>values in interface Char2ShortMapvalues in class AbstractChar2ShortMappublic ObjectSet<Char2ShortMap.Entry> char2ShortEntrySet()
Char2ShortMap