V - the keyType of elements maintained by this Collectionpublic class Int2ObjectLinkedOpenHashMap<V> extends Int2ObjectOpenHashMap<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 |
|---|
Int2ObjectLinkedOpenHashMap()
Default Constructor
|
Int2ObjectLinkedOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Int2ObjectLinkedOpenHashMap(int[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2ObjectLinkedOpenHashMap(int[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Int2ObjectLinkedOpenHashMap(Int2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenHashMap(Int2ObjectMap<V> map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenHashMap(java.lang.Integer[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2ObjectLinkedOpenHashMap(java.lang.Integer[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2ObjectLinkedOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Int2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map,
float loadFactor)
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
|
boolean |
containsValue(java.lang.Object value) |
Int2ObjectLinkedOpenHashMap<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, 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, supplyIfAbsentclearAndTrim, trimpublic Int2ObjectLinkedOpenHashMap()
public Int2ObjectLinkedOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Int2ObjectLinkedOpenHashMap(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2ObjectLinkedOpenHashMap(java.lang.Integer[] 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 Int2ObjectLinkedOpenHashMap(java.lang.Integer[] keys,
V[] values,
float loadFactor)
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 resizejava.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 Int2ObjectLinkedOpenHashMap(int[] 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 Int2ObjectLinkedOpenHashMap(int[] keys,
V[] values,
float loadFactor)
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 resizejava.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 Int2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map)
map - the values that should be present in the mappublic Int2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends V> map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2ObjectLinkedOpenHashMap(Int2ObjectMap<V> map)
map - the values that should be present in the mappublic Int2ObjectLinkedOpenHashMap(Int2ObjectMap<V> map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.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 boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Integer,V>containsValue in class Int2ObjectOpenHashMap<V>public Int2ObjectLinkedOpenHashMap<V> copy()
Int2ObjectMapcopy in interface Int2ObjectMap<V>copy in interface Int2ObjectOrderedMap<V>copy in class Int2ObjectOpenHashMap<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 Int2ObjectOpenHashMap<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 Int2ObjectOpenHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Integer,V>values in interface Int2ObjectMap<V>values in class Int2ObjectOpenHashMap<V>public void forEach(IntObjectConsumer<V> action)
Int2ObjectMapforEach in interface Int2ObjectMap<V>forEach in class Int2ObjectOpenHashMap<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 Int2ObjectOpenHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Int2ObjectOpenHashMap<V>size - the amount of elements that should be allowed