public class Char2LongAVLTreeMap extends AbstractChar2LongMap implements Char2LongNavigableMap
AbstractChar2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2LongSortedMap.FastSortedSetChar2LongMap.BuilderCache, Char2LongMap.Entry, Char2LongMap.FastEntrySet, Char2LongMap.MapBuilder| Constructor and Description |
|---|
Char2LongAVLTreeMap()
Default Constructor
|
Char2LongAVLTreeMap(char[] keys,
long[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2LongAVLTreeMap(char[] keys,
long[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Char2LongAVLTreeMap(Char2LongMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2LongAVLTreeMap(Char2LongMap map,
CharComparator comp)
A Type Specific Helper function that has a custom sorter and allows to create a new Map with exactly the same values as the provided map.
|
Char2LongAVLTreeMap(java.lang.Character[] keys,
java.lang.Long[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2LongAVLTreeMap(java.lang.Character[] keys,
java.lang.Long[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Char2LongAVLTreeMap(CharComparator comp)
Constructor that allows to define the sorter
|
Char2LongAVLTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Char2LongAVLTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map,
CharComparator comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
long |
addTo(char key,
long value)
A Helper method to add a primitives together.
|
Char2LongMap.Entry |
ceilingEntry(char key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
char |
ceilingKey(char e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
ObjectSet<Char2LongMap.Entry> |
char2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
CharComparator |
comparator() |
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
|
Char2LongAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
CharNavigableSet |
descendingKeySet() |
Char2LongNavigableMap |
descendingMap() |
char |
firstCharKey()
A method to get the first Key of a Map.
|
Char2LongMap.Entry |
firstEntry() |
long |
firstLongValue()
A method to get the first Value of a Map.
|
Char2LongMap.Entry |
floorEntry(char key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
char |
floorKey(char e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
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
|
char |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
char |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
long |
getOrDefault(char key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Char2LongNavigableMap |
headMap(char toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Char2LongMap.Entry |
higherEntry(char key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
char |
higherKey(char e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
CharNavigableSet |
keySet() |
char |
lastCharKey()
A method to get the last Key of a Map.
|
Char2LongMap.Entry |
lastEntry() |
long |
lastLongValue()
A method to get the last Value of a Map.
|
Char2LongMap.Entry |
lowerEntry(char key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
char |
lowerKey(char e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
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
|
CharNavigableSet |
navigableKeySet() |
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
Char2LongMap.Entry |
pollFirstEntry() |
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
Char2LongMap.Entry |
pollLastEntry() |
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.
|
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 |
setDefaultMaxValue(char value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(char value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
long |
subFrom(char key,
long value)
A Helper method to subtract from primitive from each other.
|
Char2LongNavigableMap |
subMap(char fromKey,
boolean fromInclusive,
char toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
long |
supplyLongIfAbsent(char key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Char2LongNavigableMap |
tailMap(char fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
LongCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceLongs, replaceLongs, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, applyAsLong, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceLongs, replaceLongs, setDefaultReturnValuepublic Char2LongAVLTreeMap()
public Char2LongAVLTreeMap(CharComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Char2LongAVLTreeMap(java.lang.Character[] keys,
java.lang.Long[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Char2LongAVLTreeMap(java.lang.Character[] keys,
java.lang.Long[] values,
CharComparator comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Char2LongAVLTreeMap(char[] keys,
long[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Char2LongAVLTreeMap(char[] keys,
long[] values,
CharComparator comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Char2LongAVLTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map)
map - the values that should be present in the mappublic Char2LongAVLTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Long> map,
CharComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Char2LongAVLTreeMap(Char2LongMap map)
map - the values that should be present in the mappublic Char2LongAVLTreeMap(Char2LongMap map, CharComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic void setDefaultMaxValue(char value)
Char2LongNavigableMapsetDefaultMaxValue in interface Char2LongNavigableMapvalue - the new max valuepublic char getDefaultMaxValue()
Char2LongNavigableMapgetDefaultMaxValue in interface Char2LongNavigableMappublic void setDefaultMinValue(char value)
Char2LongNavigableMapsetDefaultMinValue in interface Char2LongNavigableMapvalue - the new min valuepublic char getDefaultMinValue()
Char2LongNavigableMapgetDefaultMinValue in interface Char2LongNavigableMappublic 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 CharComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Character,java.lang.Long>comparator in interface Char2LongSortedMappublic boolean containsKey(char key)
Char2LongMapcontainsKey in interface Char2LongMapcontainsKey in class AbstractChar2LongMapkey - element that is searched forpublic long get(char key)
Char2LongMapget 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 char firstCharKey()
Char2LongSortedMapfirstCharKey in interface Char2LongSortedMappublic char pollFirstCharKey()
Char2LongSortedMappollFirstCharKey in interface Char2LongSortedMappublic char lastCharKey()
Char2LongSortedMaplastCharKey in interface Char2LongSortedMappublic char pollLastCharKey()
Char2LongSortedMappollLastCharKey in interface Char2LongSortedMappublic Char2LongMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>firstEntry in interface Char2LongNavigableMappublic Char2LongMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>lastEntry in interface Char2LongNavigableMappublic Char2LongMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>pollFirstEntry in interface Char2LongNavigableMappublic Char2LongMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>pollLastEntry in interface Char2LongNavigableMappublic long firstLongValue()
Char2LongSortedMapfirstLongValue in interface Char2LongSortedMappublic long lastLongValue()
Char2LongSortedMaplastLongValue in interface Char2LongSortedMappublic 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 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 supplyLongIfAbsent(char key,
LongSupplier valueProvider)
Char2LongMapsupplyLongIfAbsent in interface Char2LongMapsupplyLongIfAbsent in class AbstractChar2LongMapkey - the key that should be computedvalueProvider - 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 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 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 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 Char2LongAVLTreeMap copy()
Char2LongMapcopy in interface Char2LongMapcopy in interface Char2LongNavigableMapcopy in interface Char2LongSortedMapcopy in class AbstractChar2LongMappublic CharNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Long>keySet in interface java.util.SortedMap<java.lang.Character,java.lang.Long>keySet in interface Char2LongMapkeySet in interface Char2LongNavigableMapkeySet in interface Char2LongSortedMapkeySet in class AbstractChar2LongMappublic ObjectSet<Char2LongMap.Entry> char2LongEntrySet()
Char2LongMapchar2LongEntrySet in interface Char2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Long>values in interface java.util.SortedMap<java.lang.Character,java.lang.Long>values in interface Char2LongMapvalues in interface Char2LongSortedMapvalues in class AbstractChar2LongMappublic CharNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>navigableKeySet in interface Char2LongNavigableMappublic Char2LongNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>descendingMap in interface Char2LongNavigableMappublic CharNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Character,java.lang.Long>descendingKeySet in interface Char2LongNavigableMappublic Char2LongNavigableMap subMap(char fromKey, boolean fromInclusive, char toKey, boolean toInclusive)
Char2LongNavigableMapsubMap in interface Char2LongNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Char2LongNavigableMap headMap(char toKey, boolean inclusive)
Char2LongNavigableMapheadMap in interface Char2LongNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Char2LongNavigableMap tailMap(char fromKey, boolean inclusive)
Char2LongNavigableMaptailMap in interface Char2LongNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic char lowerKey(char e)
Char2LongNavigableMaplowerKey in interface Char2LongNavigableMape - that should be compared with.public char floorKey(char e)
Char2LongNavigableMapfloorKey in interface Char2LongNavigableMape - that should be compared with.public char higherKey(char e)
Char2LongNavigableMaphigherKey in interface Char2LongNavigableMape - that should be compared with.public char ceilingKey(char e)
Char2LongNavigableMapceilingKey in interface Char2LongNavigableMape - that should be compared with.public Char2LongMap.Entry lowerEntry(char key)
Char2LongNavigableMaplowerEntry in interface Char2LongNavigableMapkey - that should be compared with.public Char2LongMap.Entry higherEntry(char key)
Char2LongNavigableMaphigherEntry in interface Char2LongNavigableMapkey - that should be compared with.public Char2LongMap.Entry floorEntry(char key)
Char2LongNavigableMapfloorEntry in interface Char2LongNavigableMapkey - that should be compared with.public Char2LongMap.Entry ceilingEntry(char key)
Char2LongNavigableMapceilingEntry in interface Char2LongNavigableMapkey - that should be compared with.