T - the type of elements maintained by this Collectionpublic static class Object2CharMaps.EmptyMap<T> extends AbstractObject2CharMap<T>
AbstractObject2CharMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2CharMap.BuilderCache<T>, Object2CharMap.Entry<T>, Object2CharMap.FastEntrySet<T>, Object2CharMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
char |
addTo(T key,
char value)
A Helper method to add a primitives together.
|
char |
computeChar(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(T key,
Object2CharFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Object2CharMaps.EmptyMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
char |
getChar(T key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getOrDefault(T key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
void |
mergeAllChar(Object2CharMap<T> m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(T key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2CharMap.Entry<T>> |
object2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
char |
put(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
char |
remOrDefault(T key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
subFrom(T key,
char value)
A Helper method to subtract from primitive from each other.
|
char |
supplyCharIfAbsent(T 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, setDefaultReturnValuebuilder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic char put(T key, char value)
Object2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(T key, char value)
Object2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(T key, char value)
Object2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(T key, char value)
Object2CharMapObject2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic char rem(T key)
Object2CharMapkey - the element that should be removedpublic char remOrDefault(T key, char defaultValue)
Object2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, char value)
Object2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public char getChar(T key)
Object2CharMapkey - the key that is searched forpublic char getOrDefault(T key, char defaultValue)
Object2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char computeChar(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeChar in interface Object2CharMap<T>computeChar in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(T key, Object2CharFunction<T> mappingFunction)
Object2CharMapcomputeCharIfAbsent in interface Object2CharMap<T>computeCharIfAbsent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char computeCharIfPresent(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeCharIfPresent in interface Object2CharMap<T>computeCharIfPresent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char supplyCharIfAbsent(T key, CharSupplier valueProvider)
Object2CharMapsupplyCharIfAbsent in interface Object2CharMap<T>supplyCharIfAbsent in class AbstractObject2CharMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic char mergeChar(T key, char value, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeChar in interface Object2CharMap<T>mergeChar in class AbstractObject2CharMap<T>key - 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(Object2CharMap<T> m, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeAllChar in interface Object2CharMap<T>mergeAllChar in class AbstractObject2CharMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Character>keySet in interface Object2CharMap<T>keySet in class AbstractObject2CharMap<T>public CharCollection values()
values in interface java.util.Map<T,java.lang.Character>values in interface Object2CharMap<T>values in class AbstractObject2CharMap<T>public ObjectSet<Object2CharMap.Entry<T>> object2CharEntrySet()
Object2CharMappublic Object2CharMaps.EmptyMap<T> copy()
Object2CharMapcopy in interface Object2CharMap<T>copy in class AbstractObject2CharMap<T>