public static class Char2LongMaps.SynchronizedMap 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.
|
void |
addToAll(Char2LongMap m)
A Helper method to bulk add primitives together.
|
ObjectSet<Char2LongMap.Entry> |
char2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear()
Deprecated.
|
java.lang.Long |
compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
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
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Char2LongMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Long> action)
Deprecated.
|
void |
forEach(CharLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key)
Deprecated.
|
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(char key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
Deprecated.
|
CharSet |
keySet() |
java.lang.Long |
merge(java.lang.Character key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
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
|
java.lang.Long |
put(java.lang.Character key,
java.lang.Long value)
Deprecated.
|
long |
put(char key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(char[] keys,
long[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Char2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Char2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Long |
putIfAbsent(java.lang.Character key,
java.lang.Long value)
Deprecated.
|
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
|
java.lang.Long |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
long |
removeOrDefault(char key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Long |
replace(java.lang.Character key,
java.lang.Long value)
Deprecated.
|
boolean |
replace(java.lang.Character key,
java.lang.Long oldValue,
java.lang.Long newValue)
Deprecated.
|
long |
replace(char key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
replaceLongs(Char2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(CharLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractChar2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
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() |
entrySet, equals, hashCode, putAllapplyAsLong, builder, entrySet, put, put, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic long getDefaultReturnValue()
Char2LongMapgetDefaultReturnValue in interface Char2LongMapgetDefaultReturnValue in class AbstractChar2LongMappublic AbstractChar2LongMap setDefaultReturnValue(long v)
Char2LongMapsetDefaultReturnValue in interface Char2LongMapsetDefaultReturnValue in class AbstractChar2LongMapv - value that should be the default return valuepublic 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 void putAllIfAbsent(Char2LongMap m)
Char2LongMapputAllIfAbsent in interface Char2LongMapputAllIfAbsent in class AbstractChar2LongMapm - elements that should be added if not present.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 void addToAll(Char2LongMap m)
Char2LongMapaddToAll in interface Char2LongMapaddToAll in class AbstractChar2LongMapm - the values that should be added/insertedpublic void putAll(Char2LongMap m)
Char2LongMapputAll in interface Char2LongMapputAll in class AbstractChar2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Character,java.lang.Long>putAll in class AbstractChar2LongMappublic void putAll(char[] keys,
long[] values,
int offset,
int size)
Char2LongMapputAll in interface Char2LongMapputAll in class AbstractChar2LongMapkeys - 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 containsKey(char key)
Char2LongMapcontainsKey in interface Char2LongMapcontainsKey in class AbstractChar2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Char2LongMapcontainsValue in interface Char2LongMapcontainsValue in class AbstractChar2LongMapvalue - element that is searched forpublic long get(char key)
Char2LongMapget in interface Char2LongMapkey - the key that is searched forpublic 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 boolean replace(char key,
long oldValue,
long newValue)
Char2LongMapreplace in interface Char2LongMapreplace in class AbstractChar2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(char key,
long value)
Char2LongMapreplace in interface Char2LongMapreplace in class AbstractChar2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Char2LongMap m)
Char2LongMapreplaceLongs in interface Char2LongMapreplaceLongs in class AbstractChar2LongMapm - elements that should be replaced.public void replaceLongs(CharLongUnaryOperator mappingFunction)
Char2LongMapreplaceLongs in interface Char2LongMapreplaceLongs in class AbstractChar2LongMapmappingFunction - operation to replace all valuespublic 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 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 void forEach(CharLongConsumer action)
Char2LongMapforEach in interface Char2LongMapforEach in class AbstractChar2LongMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Character,java.lang.Long>size in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public Char2LongMap copy()
Char2LongMapcopy in interface Char2LongMapcopy in class AbstractChar2LongMappublic 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@Deprecated public java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Character,java.lang.Long>get in interface Char2LongMapget in class AbstractChar2LongMap@Deprecated
public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Character,java.lang.Long>getOrDefault in interface Char2LongMapgetOrDefault in class AbstractChar2LongMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Character,java.lang.Long>containsValue in interface Char2LongMapcontainsValue in class java.util.AbstractMap<java.lang.Character,java.lang.Long>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,java.lang.Long>containsKey in interface Char2LongMapcontainsKey in class java.util.AbstractMap<java.lang.Character,java.lang.Long>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Long put(java.lang.Character key,
java.lang.Long value)
put in interface java.util.Map<java.lang.Character,java.lang.Long>put in interface Char2LongMapput in class AbstractChar2LongMap@Deprecated public java.lang.Long remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,java.lang.Long>remove in interface Char2LongMapremove in class AbstractChar2LongMapkey - the element that should be removedMap.remove(Object)@Deprecated public 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>@Deprecated
public java.lang.Long putIfAbsent(java.lang.Character key,
java.lang.Long value)
putIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Long>putIfAbsent in interface Char2LongMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Character,java.lang.Long>remove in interface Char2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Character key,
java.lang.Long oldValue,
java.lang.Long newValue)
replace in interface java.util.Map<java.lang.Character,java.lang.Long>replace in interface Char2LongMap@Deprecated
public java.lang.Long replace(java.lang.Character key,
java.lang.Long value)
replace in interface java.util.Map<java.lang.Character,java.lang.Long>replace in interface Char2LongMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Character,java.lang.Long>replaceAll in interface Char2LongMap@Deprecated
public java.lang.Long compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
compute in interface java.util.Map<java.lang.Character,java.lang.Long>compute in interface Char2LongMap@Deprecated
public java.lang.Long computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Long> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Long>computeIfAbsent in interface Char2LongMap@Deprecated
public java.lang.Long computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Character,java.lang.Long>computeIfPresent in interface Char2LongMap@Deprecated
public java.lang.Long merge(java.lang.Character key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
merge in interface java.util.Map<java.lang.Character,java.lang.Long>merge in interface Char2LongMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Long> action)
forEach in interface java.util.Map<java.lang.Character,java.lang.Long>forEach in interface Char2LongMap