T - the type of elements maintained by this Collectionpublic static class Object2CharMaps.SynchronizedMap<T> extends AbstractObject2CharMap<T> implements Object2CharMap<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| Modifier and Type | Method and Description |
|---|---|
char |
addTo(T key,
char value)
A Helper method to add a primitives together.
|
void |
addToAll(Object2CharMap<T> m)
A Helper method to bulk add 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
|
boolean |
containsValue(char value)
Type Specific method to reduce boxing/unboxing of values
|
Object2CharMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(ObjectCharConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
getChar(T key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getDefaultReturnValue()
Method to see what the default return value is.
|
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
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Character> m) |
void |
putAll(Object2CharMap<T> m)
Type Specific function for the bull putting of values
|
void |
putAll(T[] keys,
char[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAllIfAbsent(Object2CharMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
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 |
replace(T key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceChars(Object2CharMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceChars(ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractObject2CharMap<T> |
setDefaultReturnValue(char v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
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() |
containsKey, entrySet, equals, get, getOrDefault, hashCode, put, putAll, removebuilder, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, get, getOrDefault, merge, put, putAll, putAll, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic char getDefaultReturnValue()
Object2CharMapgetDefaultReturnValue in interface Object2CharMap<T>getDefaultReturnValue in class AbstractObject2CharMap<T>public AbstractObject2CharMap<T> setDefaultReturnValue(char v)
Object2CharMapsetDefaultReturnValue in interface Object2CharMap<T>setDefaultReturnValue in class AbstractObject2CharMap<T>v - value that should be the default return valuepublic char put(T key, char value)
Object2CharMapput in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(T key, char value)
Object2CharMapputIfAbsent in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Object2CharMap<T> m)
Object2CharMapputAllIfAbsent in interface Object2CharMap<T>putAllIfAbsent in class AbstractObject2CharMap<T>m - elements that should be added if not present.public char addTo(T key, char value)
Object2CharMapaddTo in interface Object2CharMap<T>key - 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 removedsubFrom in interface Object2CharMap<T>key - that should be subtract fromvalue - that should be subtractpublic void addToAll(Object2CharMap<T> m)
Object2CharMapaddToAll in interface Object2CharMap<T>addToAll in class AbstractObject2CharMap<T>m - the values that should be added/insertedpublic void putAll(Object2CharMap<T> m)
Object2CharMapputAll in interface Object2CharMap<T>putAll in class AbstractObject2CharMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Character> m)
putAll in interface java.util.Map<T,java.lang.Character>putAll in class AbstractObject2CharMap<T>public void putAll(T[] keys, char[] values, int offset, int size)
Object2CharMapputAll in interface Object2CharMap<T>putAll in class AbstractObject2CharMap<T>keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsValue(char value)
Object2CharMapcontainsValue in interface Object2CharMap<T>containsValue in class AbstractObject2CharMap<T>value - element that is searched forpublic char getChar(T key)
Object2CharMapgetChar in interface Object2CharFunction<T>getChar in interface Object2CharMap<T>key - the key that is searched forpublic char rem(T key)
Object2CharMaprem in interface Object2CharMap<T>key - the element that should be removedpublic char remOrDefault(T key, char defaultValue)
Object2CharMapremOrDefault in interface Object2CharMap<T>key - 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)
Object2CharMapremove in interface Object2CharMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, char oldValue, char newValue)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(T key, char value)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceChars(Object2CharMap<T> m)
Object2CharMapreplaceChars in interface Object2CharMap<T>replaceChars in class AbstractObject2CharMap<T>m - elements that should be replaced.public void replaceChars(ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapreplaceChars in interface Object2CharMap<T>replaceChars in class AbstractObject2CharMap<T>mappingFunction - operation to replace all valuespublic 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 char getOrDefault(T key, char defaultValue)
Object2CharMapgetOrDefault in interface Object2CharMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ObjectCharConsumer<T> action)
Object2CharMapforEach in interface Object2CharMap<T>forEach in class AbstractObject2CharMap<T>action - processor of the values that are iterator overpublic int size()
public Object2CharMap<T> copy()
Object2CharMapcopy in interface Object2CharMap<T>copy in class AbstractObject2CharMap<T>public 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()
Object2CharMapobject2CharEntrySet in interface Object2CharMap<T>