public static class Char2LongMaps.UnmodifyableMap extends AbstractChar2LongMap implements Char2LongMap
AbstractChar2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2LongMap.BuilderCache, Char2LongMap.Entry, Char2LongMap.FastEntrySet, Char2LongMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
long |
addTo(char key,
long value)
A Helper method to add a primitives together.
|
ObjectSet<Char2LongMap.Entry> |
char2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
long |
computeLong(char key,
CharLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(char key,
Char2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(char key,
CharLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2LongMap |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(char key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllLong(Char2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(char key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(char key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(char key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(char key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceLongs(Char2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(CharLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
long |
subFrom(char key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(char key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic long put(char key,
long value)
Char2LongMapput in interface Char2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(char key,
long value)
Char2LongMapputIfAbsent in interface Char2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(char key,
long value)
Char2LongMapaddTo in interface Char2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(char key,
long value)
Char2LongMapChar2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Char2LongMapkey - that should be subtract fromvalue - that should be subtractpublic long remove(char key)
Char2LongMapremove in interface Char2LongMapkey - the element that should be removedpublic long removeOrDefault(char key,
long defaultValue)
Char2LongMapremoveOrDefault in interface Char2LongMapkey - 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,
long value)
Char2LongMapremove in interface Char2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long get(char key)
Char2LongMapget in interface Char2LongFunctionget in interface Char2LongMapkey - the key that is searched forpublic long getOrDefault(char key,
long defaultValue)
Char2LongMapgetOrDefault in interface Char2LongMapgetOrDefault in class AbstractChar2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long computeLong(char key,
CharLongUnaryOperator mappingFunction)
Char2LongMapcomputeLong in interface Char2LongMapcomputeLong in class AbstractChar2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(char key,
Char2LongFunction mappingFunction)
Char2LongMapcomputeLongIfAbsent in interface Char2LongMapcomputeLongIfAbsent in class AbstractChar2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(char key,
CharLongUnaryOperator mappingFunction)
Char2LongMapcomputeLongIfPresent in interface Char2LongMapcomputeLongIfPresent in class AbstractChar2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(char key,
LongSupplier valueProvider)
Char2LongMapsupplyLongIfAbsent in interface Char2LongMapsupplyLongIfAbsent in class AbstractChar2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(char key,
long value,
LongLongUnaryOperator mappingFunction)
Char2LongMapmergeLong in interface Char2LongMapmergeLong in class AbstractChar2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Char2LongMap m, LongLongUnaryOperator mappingFunction)
Char2LongMapmergeAllLong in interface Char2LongMapmergeAllLong in class AbstractChar2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceLongs(CharLongUnaryOperator mappingFunction)
Char2LongMapreplaceLongs in interface Char2LongMapreplaceLongs in class AbstractChar2LongMapmappingFunction - operation to replace all valuespublic void replaceLongs(Char2LongMap m)
Char2LongMapreplaceLongs in interface Char2LongMapreplaceLongs in class AbstractChar2LongMapm - elements that should be replaced.public Char2LongMap copy()
Char2LongMapcopy in interface Char2LongMapcopy in class AbstractChar2LongMappublic void clear()
clear in interface java.util.Map<java.lang.Character,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Long>keySet in interface Char2LongMapkeySet in class AbstractChar2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Long>values in interface Char2LongMapvalues in class AbstractChar2LongMappublic ObjectSet<Char2LongMap.Entry> char2LongEntrySet()
Char2LongMapchar2LongEntrySet in interface Char2LongMap