public class Int2LongRBTreeMap extends AbstractInt2LongMap implements Int2LongNavigableMap
AbstractInt2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2LongSortedMap.FastSortedSetInt2LongMap.FastEntrySet| Constructor and Description |
|---|
Int2LongRBTreeMap()
Default Constructor
|
Int2LongRBTreeMap(int[] keys,
long[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2LongRBTreeMap(int[] keys,
long[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Int2LongRBTreeMap(Int2LongMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2LongRBTreeMap(Int2LongMap map,
IntComparator 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.
|
Int2LongRBTreeMap(IntComparator comp)
Constructor that allows to define the sorter
|
Int2LongRBTreeMap(java.lang.Integer[] keys,
java.lang.Long[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2LongRBTreeMap(java.lang.Integer[] keys,
java.lang.Long[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Int2LongRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Long> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2LongRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Long> map,
IntComparator 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(int key,
long value)
A Helper method to add a primitives together.
|
Int2LongMap.Entry |
ceilingEntry(int key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
int |
ceilingKey(int e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
IntComparator |
comparator() |
long |
computeLong(int key,
IntLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(int key,
Int2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(int key,
IntLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
IntNavigableSet |
descendingKeySet() |
Int2LongNavigableMap |
descendingMap() |
Int2LongMap.Entry |
firstEntry() |
int |
firstIntKey()
A method to get the first Key of a Map.
|
long |
firstLongValue()
A method to get the first Value of a Map.
|
Int2LongMap.Entry |
floorEntry(int key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
int |
floorKey(int e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
long |
getAndMoveToFirst(int key)
A Specific get method that allows to move teh given key/value int the first index.
|
long |
getAndMoveToLast(int key)
A Specific get method that allows to move teh given key/value int the last index.
|
int |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
int |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
long |
getLong(int key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(int key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Int2LongNavigableMap |
headMap(int toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Int2LongMap.Entry |
higherEntry(int key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
int |
higherKey(int e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ObjectSet<Int2LongMap.Entry> |
int2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSortedSet |
keySet() |
Int2LongMap.Entry |
lastEntry() |
int |
lastIntKey()
A method to get the last Key of a Map.
|
long |
lastLongValue()
A method to get the last Value of a Map.
|
Int2LongMap.Entry |
lowerEntry(int key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
int |
lowerKey(int e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllLong(Int2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(int key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(int key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(int key)
A specific move method to move a given key/value to the last index.
|
IntNavigableSet |
navigableKeySet() |
Int2LongMap.Entry |
pollFirstEntry() |
int |
pollFirstIntKey()
A method to get and remove the first Key of a Map.
|
Int2LongMap.Entry |
pollLastEntry() |
int |
pollLastIntKey()
A method to get and remove the last Key of a Map.
|
long |
put(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putAndMoveToFirst(int key,
long value)
A customized put method that allows you to insert into the first index.
|
long |
putAndMoveToLast(int key,
long value)
A customized put method that allows you to insert into the last index.
|
long |
putIfAbsent(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remInt(int key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remIntOrDefault(int key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(int key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
replace(int key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(int value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(int value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
Int2LongNavigableMap |
subMap(int fromKey,
boolean fromInclusive,
int toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
Int2LongNavigableMap |
tailMap(int fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
LongCollection |
values() |
addToAll, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceLongs, replaceLongs, setDefaultReturnValuecontainsKey, containsValue, isEmpty, put, remove, toStringceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, tailMap, tailMap, tailMapfirstKey, lastKeyaddToAll, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceLongs, replaceLongs, setDefaultReturnValueapplyAsLongpublic Int2LongRBTreeMap()
public Int2LongRBTreeMap(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Int2LongRBTreeMap(java.lang.Integer[] 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 Int2LongRBTreeMap(java.lang.Integer[] keys,
java.lang.Long[] values,
IntComparator 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 Int2LongRBTreeMap(int[] 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 Int2LongRBTreeMap(int[] keys,
long[] values,
IntComparator 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 Int2LongRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Long> map)
map - the values that should be present in the mappublic Int2LongRBTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Long> map,
IntComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Int2LongRBTreeMap(Int2LongMap map)
map - the values that should be present in the mappublic Int2LongRBTreeMap(Int2LongMap map, IntComparator 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(int value)
Int2LongNavigableMapsetDefaultMaxValue in interface Int2LongNavigableMapvalue - the new max valuepublic int getDefaultMaxValue()
Int2LongNavigableMapgetDefaultMaxValue in interface Int2LongNavigableMappublic void setDefaultMinValue(int value)
Int2LongNavigableMapsetDefaultMinValue in interface Int2LongNavigableMapvalue - the new min valuepublic int getDefaultMinValue()
Int2LongNavigableMapgetDefaultMinValue in interface Int2LongNavigableMappublic long put(int key,
long value)
Int2LongMapput in interface Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(int key,
long value)
Int2LongMapputIfAbsent in interface Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(int key,
long value)
Int2LongMapaddTo in interface Int2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long putAndMoveToFirst(int key,
long value)
Int2LongSortedMapputAndMoveToFirst in interface Int2LongSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public long putAndMoveToLast(int key,
long value)
Int2LongSortedMapputAndMoveToLast in interface Int2LongSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(int key)
Int2LongSortedMapmoveToFirst in interface Int2LongSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(int key)
Int2LongSortedMapmoveToLast in interface Int2LongSortedMapkey - that should be moved to the first lastpublic long getAndMoveToFirst(int key)
Int2LongSortedMapgetAndMoveToFirst in interface Int2LongSortedMapkey - that is searched forpublic long getAndMoveToLast(int key)
Int2LongSortedMapgetAndMoveToLast in interface Int2LongSortedMapkey - that is searched forpublic IntComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Integer,java.lang.Long>comparator in interface Int2LongSortedMappublic boolean containsKey(int key)
Int2LongMapcontainsKey in interface Int2LongMapcontainsKey in class AbstractInt2LongMapkey - element that is searched forpublic long getLong(int key)
Int2LongMapgetLong in interface Int2LongFunctiongetLong in interface Int2LongMapkey - the key that is searched forpublic long getOrDefault(int key,
long defaultValue)
Int2LongMapgetOrDefault in interface Int2LongMapgetOrDefault in class AbstractInt2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int firstIntKey()
Int2LongSortedMapfirstIntKey in interface Int2LongSortedMappublic int pollFirstIntKey()
Int2LongSortedMappollFirstIntKey in interface Int2LongSortedMappublic int lastIntKey()
Int2LongSortedMaplastIntKey in interface Int2LongSortedMappublic int pollLastIntKey()
Int2LongSortedMappollLastIntKey in interface Int2LongSortedMappublic Int2LongMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>firstEntry in interface Int2LongNavigableMappublic Int2LongMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>lastEntry in interface Int2LongNavigableMappublic Int2LongMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>pollFirstEntry in interface Int2LongNavigableMappublic Int2LongMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>pollLastEntry in interface Int2LongNavigableMappublic long firstLongValue()
Int2LongSortedMapfirstLongValue in interface Int2LongSortedMappublic long lastLongValue()
Int2LongSortedMaplastLongValue in interface Int2LongSortedMappublic long remInt(int key)
Int2LongMapremInt in interface Int2LongMapkey - the element that should be removedpublic long remIntOrDefault(int key,
long defaultValue)
Int2LongMapremIntOrDefault in interface Int2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
long value)
Int2LongMapremove in interface Int2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
long oldValue,
long newValue)
Int2LongMapreplace in interface Int2LongMapreplace in class AbstractInt2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(int key,
long value)
Int2LongMapreplace in interface Int2LongMapreplace in class AbstractInt2LongMapkey - the element that should be searched forvalue - the value to replace with.public long computeLong(int key,
IntLongUnaryOperator mappingFunction)
Int2LongMapcomputeLong in interface Int2LongMapcomputeLong in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(int key,
Int2LongFunction mappingFunction)
Int2LongMapcomputeLongIfAbsent in interface Int2LongMapcomputeLongIfAbsent in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(int key,
IntLongUnaryOperator mappingFunction)
Int2LongMapcomputeLongIfPresent in interface Int2LongMapcomputeLongIfPresent in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(int key,
long value,
LongLongUnaryOperator mappingFunction)
Int2LongMapmergeLong in interface Int2LongMapmergeLong in class AbstractInt2LongMapkey - 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(Int2LongMap m, LongLongUnaryOperator mappingFunction)
Int2LongMapmergeAllLong in interface Int2LongMapmergeAllLong in class AbstractInt2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Long>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Long>public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Long>public IntSortedSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Long>keySet in interface java.util.SortedMap<java.lang.Integer,java.lang.Long>keySet in interface Int2LongMapkeySet in interface Int2LongSortedMapkeySet in class AbstractInt2LongMappublic ObjectSet<Int2LongMap.Entry> int2LongEntrySet()
Int2LongMapint2LongEntrySet in interface Int2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Long>values in interface java.util.SortedMap<java.lang.Integer,java.lang.Long>values in interface Int2LongMapvalues in interface Int2LongSortedMapvalues in class AbstractInt2LongMappublic IntNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>navigableKeySet in interface Int2LongNavigableMappublic Int2LongNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>descendingMap in interface Int2LongNavigableMappublic IntNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Long>descendingKeySet in interface Int2LongNavigableMappublic Int2LongNavigableMap subMap(int fromKey, boolean fromInclusive, int toKey, boolean toInclusive)
Int2LongNavigableMapsubMap in interface Int2LongNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Int2LongNavigableMap headMap(int toKey, boolean inclusive)
Int2LongNavigableMapheadMap in interface Int2LongNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Int2LongNavigableMap tailMap(int fromKey, boolean inclusive)
Int2LongNavigableMaptailMap in interface Int2LongNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic int lowerKey(int e)
Int2LongNavigableMaplowerKey in interface Int2LongNavigableMape - that should be compared with.public int floorKey(int e)
Int2LongNavigableMapfloorKey in interface Int2LongNavigableMape - that should be compared with.public int higherKey(int e)
Int2LongNavigableMaphigherKey in interface Int2LongNavigableMape - that should be compared with.public int ceilingKey(int e)
Int2LongNavigableMapceilingKey in interface Int2LongNavigableMape - that should be compared with.public Int2LongMap.Entry lowerEntry(int key)
Int2LongNavigableMaplowerEntry in interface Int2LongNavigableMapkey - that should be compared with.public Int2LongMap.Entry higherEntry(int key)
Int2LongNavigableMaphigherEntry in interface Int2LongNavigableMapkey - that should be compared with.public Int2LongMap.Entry floorEntry(int key)
Int2LongNavigableMapfloorEntry in interface Int2LongNavigableMapkey - that should be compared with.public Int2LongMap.Entry ceilingEntry(int key)
Int2LongNavigableMapceilingEntry in interface Int2LongNavigableMapkey - that should be compared with.