V - the keyType of elements maintained by this Collectionpublic class Int2ObjectLinkedOpenCustomHashMap<V> extends Int2ObjectOpenCustomHashMap<V> implements Int2ObjectOrderedMap<V>
AbstractInt2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ObjectOrderedMap.FastOrderedSet<V>Int2ObjectMap.BuilderCache<V>, Int2ObjectMap.Entry<V>, Int2ObjectMap.FastEntrySet<V>, Int2ObjectMap.MapBuilder| Constructor and Description |
|---|
Int2ObjectLinkedOpenCustomHashMap(int[] keys,
V[] values,
float loadFactor,
IntStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Int2ObjectLinkedOpenCustomHashMap(int[] keys,
V[] values,
IntStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Int2ObjectLinkedOpenCustomHashMap(Int2ObjectMap<V> map,
float loadFactor,
IntStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenCustomHashMap(Int2ObjectMap<V> map,
IntStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenCustomHashMap(java.lang.Integer[] keys,
V[] values,
float loadFactor,
IntStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2ObjectLinkedOpenCustomHashMap(java.lang.Integer[] keys,
V[] values,
IntStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
IntStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Int2ObjectLinkedOpenCustomHashMap(int minCapacity,
IntStrategy strategy)
Constructor that defines the minimum capacity
|
Int2ObjectLinkedOpenCustomHashMap(IntStrategy strategy)
Default Constructor
|
Int2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map,
float loadFactor,
IntStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map,
IntStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| 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
|
Int2ObjectLinkedOpenCustomHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
int |
firstIntKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(IntObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(int key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(int key)
A Specific get method that allows to move teh given key/value int the last index.
|
ObjectOrderedSet<Int2ObjectMap.Entry<V>> |
int2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntOrderedSet |
keySet() |
int |
lastIntKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
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.
|
int |
pollFirstIntKey()
A method to get and remove the first Key of a Map.
|
int |
pollLastIntKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(int key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(int key,
V value)
A customized put method that allows you to insert into the last index.
|
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 Int2ObjectLinkedOpenCustomHashMap(IntStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Int2ObjectLinkedOpenCustomHashMap(int minCapacity,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(java.lang.Integer[] keys,
V[] values,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(java.lang.Integer[] keys,
V[] values,
float loadFactor,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(int[] keys,
V[] values,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(int[] keys,
V[] values,
float loadFactor,
IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map, IntStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Int2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map, float loadFactor, IntStrategy 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 Int2ObjectLinkedOpenCustomHashMap(Int2ObjectMap<V> map, IntStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Int2ObjectLinkedOpenCustomHashMap(Int2ObjectMap<V> map, float loadFactor, IntStrategy 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(int key, V value)
Int2ObjectOrderedMapputAndMoveToFirst in interface Int2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(int key, V value)
Int2ObjectOrderedMapputAndMoveToLast in interface Int2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(int key)
Int2ObjectOrderedMapmoveToFirst in interface Int2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(int key)
Int2ObjectOrderedMapmoveToLast in interface Int2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(int key)
Int2ObjectOrderedMapgetAndMoveToFirst in interface Int2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(int key)
Int2ObjectOrderedMapgetAndMoveToLast in interface Int2ObjectOrderedMap<V>key - that is searched forpublic Int2ObjectLinkedOpenCustomHashMap<V> copy()
Int2ObjectMapcopy in interface Int2ObjectMap<V>copy in interface Int2ObjectOrderedMap<V>copy in class Int2ObjectOpenCustomHashMap<V>public int firstIntKey()
Int2ObjectOrderedMapfirstIntKey in interface Int2ObjectOrderedMap<V>public int pollFirstIntKey()
Int2ObjectOrderedMappollFirstIntKey in interface Int2ObjectOrderedMap<V>public int lastIntKey()
Int2ObjectOrderedMaplastIntKey in interface Int2ObjectOrderedMap<V>public int pollLastIntKey()
Int2ObjectOrderedMappollLastIntKey in interface Int2ObjectOrderedMap<V>public V firstValue()
Int2ObjectOrderedMapfirstValue in interface Int2ObjectOrderedMap<V>public V lastValue()
Int2ObjectOrderedMaplastValue in interface Int2ObjectOrderedMap<V>public ObjectOrderedSet<Int2ObjectMap.Entry<V>> int2ObjectEntrySet()
Int2ObjectMapint2ObjectEntrySet in interface Int2ObjectMap<V>int2ObjectEntrySet in interface Int2ObjectOrderedMap<V>int2ObjectEntrySet in class Int2ObjectOpenCustomHashMap<V>public IntOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Integer,V>keySet in interface Int2ObjectMap<V>keySet in interface Int2ObjectOrderedMap<V>keySet in class Int2ObjectOpenCustomHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Integer,V>values in interface Int2ObjectMap<V>values in class Int2ObjectOpenCustomHashMap<V>public void forEach(IntObjectConsumer<V> action)
Int2ObjectMapforEach in interface Int2ObjectMap<V>forEach in class Int2ObjectOpenCustomHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Integer,V>clear in class Int2ObjectOpenCustomHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Int2ObjectOpenCustomHashMap<V>size - the amount of elements that should be allowed