public static class Short2CharMaps.EmptyMap extends AbstractShort2CharMap
AbstractShort2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2CharMap.BuilderCache, Short2CharMap.Entry, Short2CharMap.FastEntrySet, Short2CharMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
char |
addTo(short key,
char value)
A Helper method to add a primitives together.
|
char |
computeChar(short key,
ShortCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(short key,
Short2CharFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(short key,
ShortCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Short2CharMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
char |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getOrDefault(short key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
void |
mergeAllChar(Short2CharMap m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(short key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
char |
put(short key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(short key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
removeOrDefault(short key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
ObjectSet<Short2CharMap.Entry> |
short2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
char |
subFrom(short key,
char value)
A Helper method to subtract from primitive from each other.
|
char |
supplyCharIfAbsent(short 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, toStringapplyAsChar, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic char put(short key,
char value)
Short2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(short key,
char value)
Short2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(short key,
char value)
Short2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(short key,
char value)
Short2CharMapShort2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic char remove(short key)
Short2CharMapkey - the element that should be removedpublic char removeOrDefault(short key,
char defaultValue)
Short2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
char value)
Short2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public char get(short key)
Short2CharMapkey - the key that is searched forpublic char getOrDefault(short key,
char defaultValue)
Short2CharMapgetOrDefault in interface Short2CharMapgetOrDefault in class AbstractShort2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char computeChar(short key,
ShortCharUnaryOperator mappingFunction)
Short2CharMapcomputeChar in interface Short2CharMapcomputeChar in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(short key,
Short2CharFunction mappingFunction)
Short2CharMapcomputeCharIfAbsent in interface Short2CharMapcomputeCharIfAbsent in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char computeCharIfPresent(short key,
ShortCharUnaryOperator mappingFunction)
Short2CharMapcomputeCharIfPresent in interface Short2CharMapcomputeCharIfPresent in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char supplyCharIfAbsent(short key,
CharSupplier valueProvider)
Short2CharMapsupplyCharIfAbsent in interface Short2CharMapsupplyCharIfAbsent in class AbstractShort2CharMapkey - the key that should be computedvalueProvider - the value if not presentpublic char mergeChar(short key,
char value,
CharCharUnaryOperator mappingFunction)
Short2CharMapmergeChar in interface Short2CharMapmergeChar in class AbstractShort2CharMapkey - 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(Short2CharMap m, CharCharUnaryOperator mappingFunction)
Short2CharMapmergeAllChar in interface Short2CharMapmergeAllChar in class AbstractShort2CharMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Character>keySet in interface Short2CharMapkeySet in class AbstractShort2CharMappublic CharCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Character>values in interface Short2CharMapvalues in class AbstractShort2CharMappublic ObjectSet<Short2CharMap.Entry> short2CharEntrySet()
Short2CharMappublic Short2CharMaps.EmptyMap copy()
Short2CharMapcopy in interface Short2CharMapcopy in class AbstractShort2CharMap