V - the keyType of elements maintained by this Collectionpublic class Short2ObjectAVLTreeMap<V> extends AbstractShort2ObjectMap<V> implements Short2ObjectNavigableMap<V>
AbstractShort2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ObjectSortedMap.FastSortedSet<V>Short2ObjectMap.BuilderCache<V>, Short2ObjectMap.Entry<V>, Short2ObjectMap.FastEntrySet<V>, Short2ObjectMap.MapBuilder| Constructor and Description |
|---|
Short2ObjectAVLTreeMap()
Default Constructor
|
Short2ObjectAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2ObjectAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends V> map,
ShortComparator comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
Short2ObjectAVLTreeMap(short[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2ObjectAVLTreeMap(java.lang.Short[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2ObjectAVLTreeMap(short[] keys,
V[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Short2ObjectAVLTreeMap(java.lang.Short[] keys,
V[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Short2ObjectAVLTreeMap(Short2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2ObjectAVLTreeMap(Short2ObjectMap<V> map,
ShortComparator 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.
|
Short2ObjectAVLTreeMap(ShortComparator comp)
Constructor that allows to define the sorter
|
| Modifier and Type | Method and Description |
|---|---|
Short2ObjectMap.Entry<V> |
ceilingEntry(short key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
short |
ceilingKey(short e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
ShortComparator |
comparator() |
V |
compute(short key,
ShortObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(short key,
ShortFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(short key,
ShortObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
Short2ObjectAVLTreeMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ShortNavigableSet |
descendingKeySet() |
Short2ObjectNavigableMap<V> |
descendingMap() |
Short2ObjectMap.Entry<V> |
firstEntry() |
short |
firstShortKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
Short2ObjectMap.Entry<V> |
floorEntry(short key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
short |
floorKey(short e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(ShortObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
short |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
V |
getOrDefault(short key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Short2ObjectNavigableMap<V> |
headMap(short toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Short2ObjectMap.Entry<V> |
higherEntry(short key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
short |
higherKey(short e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ShortNavigableSet |
keySet() |
Short2ObjectMap.Entry<V> |
lastEntry() |
short |
lastShortKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
Short2ObjectMap.Entry<V> |
lowerEntry(short key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
short |
lowerKey(short e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
V |
merge(short key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Short2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
ShortNavigableSet |
navigableKeySet() |
Short2ObjectMap.Entry<V> |
pollFirstEntry() |
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
Short2ObjectMap.Entry<V> |
pollLastEntry() |
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
V |
put(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(short key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(short key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(short value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(short value)
A Helper method to set the min value for SubMaps.
|
ObjectSet<Short2ObjectMap.Entry<V>> |
short2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
Short2ObjectNavigableMap<V> |
subMap(short fromKey,
boolean fromInclusive,
short toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
V |
supplyIfAbsent(short key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Short2ObjectNavigableMap<V> |
tailMap(short fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ObjectCollection<V> |
values() |
containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceObjects, replaceObjects, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyapply, builder, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValuepublic Short2ObjectAVLTreeMap()
public Short2ObjectAVLTreeMap(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Short2ObjectAVLTreeMap(java.lang.Short[] keys,
V[] 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 Short2ObjectAVLTreeMap(java.lang.Short[] keys,
V[] values,
ShortComparator 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 Short2ObjectAVLTreeMap(short[] keys,
V[] 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 Short2ObjectAVLTreeMap(short[] keys,
V[] values,
ShortComparator 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 Short2ObjectAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends V> map)
map - the values that should be present in the mappublic Short2ObjectAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends V> map, ShortComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Short2ObjectAVLTreeMap(Short2ObjectMap<V> map)
map - the values that should be present in the mappublic Short2ObjectAVLTreeMap(Short2ObjectMap<V> map, ShortComparator 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(short value)
Short2ObjectNavigableMapsetDefaultMaxValue in interface Short2ObjectNavigableMap<V>value - the new max valuepublic short getDefaultMaxValue()
Short2ObjectNavigableMapgetDefaultMaxValue in interface Short2ObjectNavigableMap<V>public void setDefaultMinValue(short value)
Short2ObjectNavigableMapsetDefaultMinValue in interface Short2ObjectNavigableMap<V>value - the new min valuepublic short getDefaultMinValue()
Short2ObjectNavigableMapgetDefaultMinValue in interface Short2ObjectNavigableMap<V>public V put(short key, V value)
Short2ObjectMapput in interface Short2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(short key, V value)
Short2ObjectMapputIfAbsent in interface Short2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public ShortComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Short,V>comparator in interface Short2ObjectSortedMap<V>public boolean containsKey(short key)
Short2ObjectMapcontainsKey in interface Short2ObjectMap<V>containsKey in class AbstractShort2ObjectMap<V>key - element that is searched forpublic V get(short key)
Short2ObjectMapget in interface Short2ObjectMap<V>key - the key that is searched forpublic V getOrDefault(short key, V defaultValue)
Short2ObjectMapgetOrDefault in interface Short2ObjectMap<V>getOrDefault in class AbstractShort2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short firstShortKey()
Short2ObjectSortedMapfirstShortKey in interface Short2ObjectSortedMap<V>public short pollFirstShortKey()
Short2ObjectSortedMappollFirstShortKey in interface Short2ObjectSortedMap<V>public short lastShortKey()
Short2ObjectSortedMaplastShortKey in interface Short2ObjectSortedMap<V>public short pollLastShortKey()
Short2ObjectSortedMappollLastShortKey in interface Short2ObjectSortedMap<V>public Short2ObjectMap.Entry<V> firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Short,V>firstEntry in interface Short2ObjectNavigableMap<V>public Short2ObjectMap.Entry<V> lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Short,V>lastEntry in interface Short2ObjectNavigableMap<V>public Short2ObjectMap.Entry<V> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Short,V>pollFirstEntry in interface Short2ObjectNavigableMap<V>public Short2ObjectMap.Entry<V> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Short,V>pollLastEntry in interface Short2ObjectNavigableMap<V>public V firstValue()
Short2ObjectSortedMapfirstValue in interface Short2ObjectSortedMap<V>public V lastValue()
Short2ObjectSortedMaplastValue in interface Short2ObjectSortedMap<V>public V remove(short key)
Short2ObjectMapremove in interface Short2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(short key, V defaultValue)
Short2ObjectMapremoveOrDefault in interface Short2ObjectMap<V>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
V value)
Short2ObjectMapremove in interface Short2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
V oldValue,
V newValue)
Short2ObjectMapreplace in interface Short2ObjectMap<V>replace in class AbstractShort2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(short key, V value)
Short2ObjectMapreplace in interface Short2ObjectMap<V>replace in class AbstractShort2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public V compute(short key, ShortObjectUnaryOperator<V> mappingFunction)
Short2ObjectMapcompute in interface Short2ObjectMap<V>compute in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(short key, ShortFunction<V> mappingFunction)
Short2ObjectMapcomputeIfAbsent in interface Short2ObjectMap<V>computeIfAbsent in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(short key, ObjectSupplier<V> valueProvider)
Short2ObjectMapsupplyIfAbsent in interface Short2ObjectMap<V>supplyIfAbsent in class AbstractShort2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(short key, ShortObjectUnaryOperator<V> mappingFunction)
Short2ObjectMapcomputeIfPresent in interface Short2ObjectMap<V>computeIfPresent in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(short key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Short2ObjectMapmerge in interface Short2ObjectMap<V>merge in class AbstractShort2ObjectMap<V>key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAll(Short2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Short2ObjectMapmergeAll in interface Short2ObjectMap<V>mergeAll in class AbstractShort2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ShortObjectConsumer<V> action)
Short2ObjectMapforEach in interface Short2ObjectMap<V>forEach in class AbstractShort2ObjectMap<V>action - processor of the values that are iterator overpublic int size()
public void clear()
public Short2ObjectAVLTreeMap<V> copy()
Short2ObjectMapcopy in interface Short2ObjectMap<V>copy in interface Short2ObjectNavigableMap<V>copy in interface Short2ObjectSortedMap<V>copy in class AbstractShort2ObjectMap<V>public ShortNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Short,V>keySet in interface java.util.SortedMap<java.lang.Short,V>keySet in interface Short2ObjectMap<V>keySet in interface Short2ObjectNavigableMap<V>keySet in interface Short2ObjectSortedMap<V>keySet in class AbstractShort2ObjectMap<V>public ObjectSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet()
Short2ObjectMapshort2ObjectEntrySet in interface Short2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Short,V>values in interface java.util.SortedMap<java.lang.Short,V>values in interface Short2ObjectMap<V>values in interface Short2ObjectSortedMap<V>values in class AbstractShort2ObjectMap<V>public ShortNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Short,V>navigableKeySet in interface Short2ObjectNavigableMap<V>public Short2ObjectNavigableMap<V> descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Short,V>descendingMap in interface Short2ObjectNavigableMap<V>public ShortNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Short,V>descendingKeySet in interface Short2ObjectNavigableMap<V>public Short2ObjectNavigableMap<V> subMap(short fromKey, boolean fromInclusive, short toKey, boolean toInclusive)
Short2ObjectNavigableMapsubMap in interface Short2ObjectNavigableMap<V>fromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Short2ObjectNavigableMap<V> headMap(short toKey, boolean inclusive)
Short2ObjectNavigableMapheadMap in interface Short2ObjectNavigableMap<V>toKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Short2ObjectNavigableMap<V> tailMap(short fromKey, boolean inclusive)
Short2ObjectNavigableMaptailMap in interface Short2ObjectNavigableMap<V>fromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic short lowerKey(short e)
Short2ObjectNavigableMaplowerKey in interface Short2ObjectNavigableMap<V>e - that should be compared with.public short floorKey(short e)
Short2ObjectNavigableMapfloorKey in interface Short2ObjectNavigableMap<V>e - that should be compared with.public short higherKey(short e)
Short2ObjectNavigableMaphigherKey in interface Short2ObjectNavigableMap<V>e - that should be compared with.public short ceilingKey(short e)
Short2ObjectNavigableMapceilingKey in interface Short2ObjectNavigableMap<V>e - that should be compared with.public Short2ObjectMap.Entry<V> lowerEntry(short key)
Short2ObjectNavigableMaplowerEntry in interface Short2ObjectNavigableMap<V>key - that should be compared with.public Short2ObjectMap.Entry<V> higherEntry(short key)
Short2ObjectNavigableMaphigherEntry in interface Short2ObjectNavigableMap<V>key - that should be compared with.public Short2ObjectMap.Entry<V> floorEntry(short key)
Short2ObjectNavigableMapfloorEntry in interface Short2ObjectNavigableMap<V>key - that should be compared with.public Short2ObjectMap.Entry<V> ceilingEntry(short key)
Short2ObjectNavigableMapceilingEntry in interface Short2ObjectNavigableMap<V>key - that should be compared with.