public abstract class AbstractChar2LongMap extends java.util.AbstractMap<java.lang.Character,java.lang.Long> implements Char2LongMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractChar2LongMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2LongMap.Entry, Char2LongMap.FastEntrySet| Constructor and Description |
|---|
AbstractChar2LongMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Char2LongMap m)
A Helper method to bulk add primitives together.
|
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 |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Long>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(CharLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key) |
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) |
int |
hashCode() |
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
|
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.
|
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 |
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
|
LongCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, char2LongEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getLong, merge, put, put, putAll, putIfAbsent, putIfAbsent, remChar, remCharOrDefault, remove, remove, remove, replace, replace, replaceAllpublic long getDefaultReturnValue()
Char2LongMapgetDefaultReturnValue in interface Char2LongMappublic AbstractChar2LongMap setDefaultReturnValue(long v)
Char2LongMapsetDefaultReturnValue in interface Char2LongMapv - value that should be the default return valuepublic void addToAll(Char2LongMap m)
Char2LongMapaddToAll in interface Char2LongMapm - the values that should be added/insertedpublic void putAll(Char2LongMap m)
Char2LongMapputAll in interface Char2LongMapm - 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 java.util.AbstractMap<java.lang.Character,java.lang.Long>public void putAll(char[] keys,
long[] values,
int offset,
int size)
Char2LongMapputAll in interface Char2LongMapkeys - 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 void putAllIfAbsent(Char2LongMap m)
Char2LongMapputAllIfAbsent in interface Char2LongMapm - elements that should be added if not present.public boolean containsKey(char key)
Char2LongMapcontainsKey in interface Char2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Char2LongMapcontainsValue in interface Char2LongMapvalue - element that is searched forpublic boolean replace(char key,
long oldValue,
long newValue)
Char2LongMapreplace in interface Char2LongMapkey - 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 Char2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Char2LongMap m)
Char2LongMapreplaceLongs in interface Char2LongMapm - elements that should be replaced.public void replaceLongs(CharLongUnaryOperator mappingFunction)
Char2LongMapreplaceLongs in interface Char2LongMapmappingFunction - operation to replace all valuespublic long computeLong(char key,
CharLongUnaryOperator mappingFunction)
Char2LongMapcomputeLong in interface Char2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(char key,
Char2LongFunction mappingFunction)
Char2LongMapcomputeLongIfAbsent in interface Char2LongMapkey - 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 Char2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(char key,
long value,
LongLongUnaryOperator mappingFunction)
Char2LongMapmergeLong in interface Char2LongMapkey - 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 Char2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic 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 java.util.AbstractMap<java.lang.Character,java.lang.Long>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 Char2LongMappublic long getOrDefault(char key,
long defaultValue)
Char2LongMapgetOrDefault in interface Char2LongMapkey - 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 Char2LongMapaction - processor of the values that are iterator overpublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Long>keySet in interface Char2LongMapkeySet in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public LongCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Long>values in interface Char2LongMapvalues in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Long>> entrySet()
entrySet in interface java.util.Map<java.lang.Character,java.lang.Long>entrySet in interface Char2LongMapentrySet in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Character,java.lang.Long>equals in class java.util.AbstractMap<java.lang.Character,java.lang.Long>public int hashCode()
hashCode in interface java.util.Map<java.lang.Character,java.lang.Long>hashCode in class java.util.AbstractMap<java.lang.Character,java.lang.Long>