V - the keyType of elements maintained by this Collectionpublic class Short2ObjectLinkedOpenCustomHashMap<V> extends Short2ObjectOpenCustomHashMap<V> implements Short2ObjectOrderedMap<V>
AbstractShort2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ObjectOrderedMap.FastOrderedSet<V>Short2ObjectMap.BuilderCache<V>, Short2ObjectMap.Entry<V>, Short2ObjectMap.FastEntrySet<V>, Short2ObjectMap.MapBuilder| Constructor and Description |
|---|
Short2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ShortStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Short2ObjectLinkedOpenCustomHashMap(int minCapacity,
ShortStrategy strategy)
Constructor that defines the minimum capacity
|
Short2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Short,? extends V> map,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Short,? extends V> map,
ShortStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2ObjectLinkedOpenCustomHashMap(short[] keys,
V[] values,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Short2ObjectLinkedOpenCustomHashMap(java.lang.Short[] keys,
V[] values,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2ObjectLinkedOpenCustomHashMap(short[] keys,
V[] values,
ShortStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Short2ObjectLinkedOpenCustomHashMap(java.lang.Short[] keys,
V[] values,
ShortStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2ObjectLinkedOpenCustomHashMap(Short2ObjectMap<V> map,
float loadFactor,
ShortStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2ObjectLinkedOpenCustomHashMap(Short2ObjectMap<V> map,
ShortStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2ObjectLinkedOpenCustomHashMap(ShortStrategy strategy)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
Short2ObjectLinkedOpenCustomHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
short |
firstShortKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(ShortObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(short key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(short key)
A Specific get method that allows to move teh given key/value int the last index.
|
ShortOrderedSet |
keySet() |
short |
lastShortKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(short key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(short key)
A specific move method to move a given key/value to the last index.
|
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(short key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(short key,
V value)
A customized put method that allows you to insert into the last index.
|
ObjectOrderedSet<Short2ObjectMap.Entry<V>> |
short2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, get, get, getOrDefault, merge, mergeAll, put, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, size, supplyIfAbsent, trimentrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceObjects, replaceObjects, setDefaultReturnValuesynchronize, synchronize, unmodifiableapply, builder, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, containsKey, containsKey, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, merge, mergeAll, put, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValue, supplyIfAbsentcontainsValue, equals, hashCode, isEmpty, putAll, sizeclearAndTrim, trimpublic Short2ObjectLinkedOpenCustomHashMap(ShortStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Short2ObjectLinkedOpenCustomHashMap(int minCapacity,
ShortStrategy strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic Short2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ShortStrategy strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Short2ObjectLinkedOpenCustomHashMap(java.lang.Short[] keys,
V[] values,
ShortStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Short2ObjectLinkedOpenCustomHashMap(java.lang.Short[] keys,
V[] values,
float loadFactor,
ShortStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Short2ObjectLinkedOpenCustomHashMap(short[] keys,
V[] values,
ShortStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Short2ObjectLinkedOpenCustomHashMap(short[] keys,
V[] values,
float loadFactor,
ShortStrategy strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Short2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Short,? extends V> map, ShortStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Short2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Short,? extends V> map, float loadFactor, ShortStrategy strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Short2ObjectLinkedOpenCustomHashMap(Short2ObjectMap<V> map, ShortStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Short2ObjectLinkedOpenCustomHashMap(Short2ObjectMap<V> map, float loadFactor, ShortStrategy strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public V putAndMoveToFirst(short key, V value)
Short2ObjectOrderedMapputAndMoveToFirst in interface Short2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(short key, V value)
Short2ObjectOrderedMapputAndMoveToLast in interface Short2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(short key)
Short2ObjectOrderedMapmoveToFirst in interface Short2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(short key)
Short2ObjectOrderedMapmoveToLast in interface Short2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(short key)
Short2ObjectOrderedMapgetAndMoveToFirst in interface Short2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(short key)
Short2ObjectOrderedMapgetAndMoveToLast in interface Short2ObjectOrderedMap<V>key - that is searched forpublic Short2ObjectLinkedOpenCustomHashMap<V> copy()
Short2ObjectMapcopy in interface Short2ObjectMap<V>copy in interface Short2ObjectOrderedMap<V>copy in class Short2ObjectOpenCustomHashMap<V>public short firstShortKey()
Short2ObjectOrderedMapfirstShortKey in interface Short2ObjectOrderedMap<V>public short pollFirstShortKey()
Short2ObjectOrderedMappollFirstShortKey in interface Short2ObjectOrderedMap<V>public short lastShortKey()
Short2ObjectOrderedMaplastShortKey in interface Short2ObjectOrderedMap<V>public short pollLastShortKey()
Short2ObjectOrderedMappollLastShortKey in interface Short2ObjectOrderedMap<V>public V firstValue()
Short2ObjectOrderedMapfirstValue in interface Short2ObjectOrderedMap<V>public V lastValue()
Short2ObjectOrderedMaplastValue in interface Short2ObjectOrderedMap<V>public ObjectOrderedSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet()
Short2ObjectMapshort2ObjectEntrySet in interface Short2ObjectMap<V>short2ObjectEntrySet in interface Short2ObjectOrderedMap<V>short2ObjectEntrySet in class Short2ObjectOpenCustomHashMap<V>public ShortOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Short,V>keySet in interface Short2ObjectMap<V>keySet in interface Short2ObjectOrderedMap<V>keySet in class Short2ObjectOpenCustomHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Short,V>values in interface Short2ObjectMap<V>values in class Short2ObjectOpenCustomHashMap<V>public void forEach(ShortObjectConsumer<V> action)
Short2ObjectMapforEach in interface Short2ObjectMap<V>forEach in class Short2ObjectOpenCustomHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Short,V>clear in class Short2ObjectOpenCustomHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Short2ObjectOpenCustomHashMap<V>size - the amount of elements that should be allowed