V - the keyType of elements maintained by this Collectionpublic class Long2ObjectLinkedOpenHashMap<V> extends Long2ObjectOpenHashMap<V> implements Long2ObjectOrderedMap<V>
AbstractLong2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ObjectOrderedMap.FastOrderedSet<V>Long2ObjectMap.BuilderCache<V>, Long2ObjectMap.Entry<V>, Long2ObjectMap.FastEntrySet<V>, Long2ObjectMap.MapBuilder| Constructor and Description |
|---|
Long2ObjectLinkedOpenHashMap()
Default Constructor
|
Long2ObjectLinkedOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Long2ObjectLinkedOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Long2ObjectLinkedOpenHashMap(long[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Long2ObjectLinkedOpenHashMap(java.lang.Long[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2ObjectLinkedOpenHashMap(long[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Long2ObjectLinkedOpenHashMap(java.lang.Long[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2ObjectLinkedOpenHashMap(Long2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2ObjectLinkedOpenHashMap(Long2ObjectMap<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.
|
Long2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Long2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? 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) |
Long2ObjectLinkedOpenHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
firstLongKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(LongObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(long key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(long key)
A Specific get method that allows to move teh given key/value int the last index.
|
LongOrderedSet |
keySet() |
long |
lastLongKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
ObjectOrderedSet<Long2ObjectMap.Entry<V>> |
long2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
boolean |
moveToFirst(long key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(long key)
A specific move method to move a given key/value to the last index.
|
long |
pollFirstLongKey()
A method to get and remove the first Key of a Map.
|
long |
pollLastLongKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(long key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(long 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 Long2ObjectLinkedOpenHashMap()
public Long2ObjectLinkedOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Long2ObjectLinkedOpenHashMap(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 Long2ObjectLinkedOpenHashMap(java.lang.Long[] 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 Long2ObjectLinkedOpenHashMap(java.lang.Long[] 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 Long2ObjectLinkedOpenHashMap(long[] 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 Long2ObjectLinkedOpenHashMap(long[] 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 Long2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? extends V> map)
map - the values that should be present in the mappublic Long2ObjectLinkedOpenHashMap(java.util.Map<? extends java.lang.Long,? 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 Long2ObjectLinkedOpenHashMap(Long2ObjectMap<V> map)
map - the values that should be present in the mappublic Long2ObjectLinkedOpenHashMap(Long2ObjectMap<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(long key, V value)
Long2ObjectOrderedMapputAndMoveToFirst in interface Long2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(long key, V value)
Long2ObjectOrderedMapputAndMoveToLast in interface Long2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(long key)
Long2ObjectOrderedMapmoveToFirst in interface Long2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(long key)
Long2ObjectOrderedMapmoveToLast in interface Long2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(long key)
Long2ObjectOrderedMapgetAndMoveToFirst in interface Long2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(long key)
Long2ObjectOrderedMapgetAndMoveToLast in interface Long2ObjectOrderedMap<V>key - that is searched forpublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,V>containsValue in class Long2ObjectOpenHashMap<V>public Long2ObjectLinkedOpenHashMap<V> copy()
Long2ObjectMapcopy in interface Long2ObjectMap<V>copy in interface Long2ObjectOrderedMap<V>copy in class Long2ObjectOpenHashMap<V>public long firstLongKey()
Long2ObjectOrderedMapfirstLongKey in interface Long2ObjectOrderedMap<V>public long pollFirstLongKey()
Long2ObjectOrderedMappollFirstLongKey in interface Long2ObjectOrderedMap<V>public long lastLongKey()
Long2ObjectOrderedMaplastLongKey in interface Long2ObjectOrderedMap<V>public long pollLastLongKey()
Long2ObjectOrderedMappollLastLongKey in interface Long2ObjectOrderedMap<V>public V firstValue()
Long2ObjectOrderedMapfirstValue in interface Long2ObjectOrderedMap<V>public V lastValue()
Long2ObjectOrderedMaplastValue in interface Long2ObjectOrderedMap<V>public ObjectOrderedSet<Long2ObjectMap.Entry<V>> long2ObjectEntrySet()
Long2ObjectMaplong2ObjectEntrySet in interface Long2ObjectMap<V>long2ObjectEntrySet in interface Long2ObjectOrderedMap<V>long2ObjectEntrySet in class Long2ObjectOpenHashMap<V>public LongOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Long,V>keySet in interface Long2ObjectMap<V>keySet in interface Long2ObjectOrderedMap<V>keySet in class Long2ObjectOpenHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Long,V>values in interface Long2ObjectMap<V>values in class Long2ObjectOpenHashMap<V>public void forEach(LongObjectConsumer<V> action)
Long2ObjectMapforEach in interface Long2ObjectMap<V>forEach in class Long2ObjectOpenHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Long,V>clear in class Long2ObjectOpenHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Long2ObjectOpenHashMap<V>size - the amount of elements that should be allowed