T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic class Object2ObjectLinkedOpenHashMap<T,V> extends Object2ObjectOpenHashMap<T,V> implements Object2ObjectSortedMap<T,V>
AbstractObject2ObjectMap.BasicEntry<T,V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ObjectSortedMap.FastSortedSet<T,V>Object2ObjectMap.Entry<T,V>, Object2ObjectMap.FastEntrySet<T,V>| Constructor and Description |
|---|
Object2ObjectLinkedOpenHashMap()
Default Constructor
|
Object2ObjectLinkedOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Object2ObjectLinkedOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Object2ObjectLinkedOpenHashMap(java.util.Map<? extends T,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenHashMap(java.util.Map<? extends T,? extends V> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenHashMap(Object2ObjectMap<T,V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenHashMap(Object2ObjectMap<T,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.
|
Object2ObjectLinkedOpenHashMap(T[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2ObjectLinkedOpenHashMap(T[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.util.Comparator<T> |
comparator() |
T |
firstKey() |
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(ObjectObjectConsumer<T,V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(T key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(T key)
A Specific get method that allows to move teh given key/value int the last index.
|
Object2ObjectSortedMap<T,V> |
headMap(T toKey) |
ObjectSet<T> |
keySet() |
T |
lastKey() |
V |
lastValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(T key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(T key)
A specific move method to move a given key/value to the last index.
|
ObjectSet<Object2ObjectMap.Entry<T,V>> |
object2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
T |
pollLastKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(T key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(T key,
V value)
A customized put method that allows you to insert into the last index.
|
Object2ObjectSortedMap<T,V> |
subMap(T fromKey,
T toKey) |
Object2ObjectSortedMap<T,V> |
tailMap(T fromKey) |
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, get, getObject, getOrDefault, merge, mergeAll, put, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, sizeentrySet, equals, getDefaultReturnValue, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceObjects, replaceObjects, setDefaultReturnValuecompute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, entrySet, forEach, getDefaultReturnValue, merge, merge, mergeAll, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, rem, remOrDefault, remove, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValuecontainsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, putAll, remove, sizeapply, getObjectpublic Object2ObjectLinkedOpenHashMap()
public Object2ObjectLinkedOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Object2ObjectLinkedOpenHashMap(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 Object2ObjectLinkedOpenHashMap(T[] 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 Object2ObjectLinkedOpenHashMap(T[] 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 Object2ObjectLinkedOpenHashMap(java.util.Map<? extends T,? extends V> map)
map - the values that should be present in the mappublic Object2ObjectLinkedOpenHashMap(java.util.Map<? extends T,? 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 Object2ObjectLinkedOpenHashMap(Object2ObjectMap<T,V> map)
map - the values that should be present in the mappublic Object2ObjectLinkedOpenHashMap(Object2ObjectMap<T,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(T key, V value)
Object2ObjectSortedMapputAndMoveToFirst in interface Object2ObjectSortedMap<T,V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(T key, V value)
Object2ObjectSortedMapputAndMoveToLast in interface Object2ObjectSortedMap<T,V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2ObjectSortedMapmoveToFirst in interface Object2ObjectSortedMap<T,V>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2ObjectSortedMapmoveToLast in interface Object2ObjectSortedMap<T,V>key - that should be moved to the first lastpublic V getAndMoveToFirst(T key)
Object2ObjectSortedMapgetAndMoveToFirst in interface Object2ObjectSortedMap<T,V>key - that is searched forpublic V getAndMoveToLast(T key)
Object2ObjectSortedMapgetAndMoveToLast in interface Object2ObjectSortedMap<T,V>key - that is searched forpublic java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,V>comparator in interface Object2ObjectSortedMap<T,V>public Object2ObjectSortedMap<T,V> subMap(T fromKey, T toKey)
public Object2ObjectSortedMap<T,V> headMap(T toKey)
public Object2ObjectSortedMap<T,V> tailMap(T fromKey)
public T pollFirstKey()
Object2ObjectSortedMappollFirstKey in interface Object2ObjectSortedMap<T,V>public T pollLastKey()
Object2ObjectSortedMappollLastKey in interface Object2ObjectSortedMap<T,V>public V firstValue()
Object2ObjectSortedMapfirstValue in interface Object2ObjectSortedMap<T,V>public V lastValue()
Object2ObjectSortedMaplastValue in interface Object2ObjectSortedMap<T,V>public ObjectSet<Object2ObjectMap.Entry<T,V>> object2ObjectEntrySet()
Object2ObjectMapobject2ObjectEntrySet in interface Object2ObjectMap<T,V>object2ObjectEntrySet in class Object2ObjectOpenHashMap<T,V>public ObjectCollection<V> values()
public void forEach(ObjectObjectConsumer<T,V> action)
Object2ObjectMapforEach in interface Object2ObjectMap<T,V>forEach in class Object2ObjectOpenHashMap<T,V>action - processor of the values that are iterator over