T - the keyType of elements maintained by this CollectionV - the keyType of elements maintained by this Collectionpublic class Object2ObjectLinkedOpenCustomHashMap<T,V> extends Object2ObjectOpenCustomHashMap<T,V> implements Object2ObjectOrderedMap<T,V>
AbstractObject2ObjectMap.BasicEntry<T,V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ObjectOrderedMap.FastOrderedSet<T,V>Object2ObjectMap.BuilderCache<T,V>, Object2ObjectMap.Entry<T,V>, Object2ObjectMap.FastEntrySet<T,V>, Object2ObjectMap.MapBuilder| Constructor and Description |
|---|
Object2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity and load factor
|
Object2ObjectLinkedOpenCustomHashMap(int minCapacity,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity
|
Object2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends T,? extends V> map,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends T,? extends V> map,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenCustomHashMap(Object2ObjectMap<T,V> map,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenCustomHashMap(Object2ObjectMap<T,V> map,
ObjectStrategy<? super T> strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2ObjectLinkedOpenCustomHashMap(ObjectStrategy<? super T> strategy)
Default Constructor
|
Object2ObjectLinkedOpenCustomHashMap(T[] keys,
V[] values,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from unboxed values
|
Object2ObjectLinkedOpenCustomHashMap(T[] keys,
V[] values,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from unboxed values
|
| 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
|
Object2ObjectLinkedOpenCustomHashMap<T,V> |
copy()
A Function that does a shallow clone of the Map itself.
|
T |
firstKey()
A method to get the first Key of a Map.
|
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.
|
ObjectOrderedSet<T> |
keySet() |
T |
lastKey()
A method to get the last Key of a Map.
|
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.
|
ObjectOrderedSet<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.
|
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, get, getObject, getOrDefault, merge, mergeAll, put, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, size, supplyIfAbsent, trimentrySet, equals, getDefaultReturnValue, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceObjects, replaceObjects, setDefaultReturnValuesynchronize, synchronize, unmodifiableapply, builder, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, entrySet, forEach, getDefaultReturnValue, getObject, merge, merge, mergeAll, put, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, rem, remOrDefault, remove, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValue, supplyIfAbsentcontainsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, putAll, remove, sizeandThen, compose, identityclearAndTrim, trimpublic Object2ObjectLinkedOpenCustomHashMap(ObjectStrategy<? super T> strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2ObjectLinkedOpenCustomHashMap(int minCapacity,
ObjectStrategy<? super T> 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 Object2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> 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 Object2ObjectLinkedOpenCustomHashMap(T[] keys, V[] values, ObjectStrategy<? super T> 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 Object2ObjectLinkedOpenCustomHashMap(T[] keys, V[] values, float loadFactor, ObjectStrategy<? super T> 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 Object2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends T,? extends V> map, ObjectStrategy<? super T> strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends T,? extends V> map, float loadFactor, ObjectStrategy<? super T> 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 Object2ObjectLinkedOpenCustomHashMap(Object2ObjectMap<T,V> map, ObjectStrategy<? super T> strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2ObjectLinkedOpenCustomHashMap(Object2ObjectMap<T,V> map, float loadFactor, ObjectStrategy<? super T> 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(T key, V value)
Object2ObjectOrderedMapputAndMoveToFirst in interface Object2ObjectOrderedMap<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)
Object2ObjectOrderedMapputAndMoveToLast in interface Object2ObjectOrderedMap<T,V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2ObjectOrderedMapmoveToFirst in interface Object2ObjectOrderedMap<T,V>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2ObjectOrderedMapmoveToLast in interface Object2ObjectOrderedMap<T,V>key - that should be moved to the first lastpublic V getAndMoveToFirst(T key)
Object2ObjectOrderedMapgetAndMoveToFirst in interface Object2ObjectOrderedMap<T,V>key - that is searched forpublic V getAndMoveToLast(T key)
Object2ObjectOrderedMapgetAndMoveToLast in interface Object2ObjectOrderedMap<T,V>key - that is searched forpublic Object2ObjectLinkedOpenCustomHashMap<T,V> copy()
Object2ObjectMapcopy in interface Object2ObjectMap<T,V>copy in interface Object2ObjectOrderedMap<T,V>copy in class Object2ObjectOpenCustomHashMap<T,V>public T firstKey()
Object2ObjectOrderedMapfirstKey in interface Object2ObjectOrderedMap<T,V>public T pollFirstKey()
Object2ObjectOrderedMappollFirstKey in interface Object2ObjectOrderedMap<T,V>public T lastKey()
Object2ObjectOrderedMaplastKey in interface Object2ObjectOrderedMap<T,V>public T pollLastKey()
Object2ObjectOrderedMappollLastKey in interface Object2ObjectOrderedMap<T,V>public V firstValue()
Object2ObjectOrderedMapfirstValue in interface Object2ObjectOrderedMap<T,V>public V lastValue()
Object2ObjectOrderedMaplastValue in interface Object2ObjectOrderedMap<T,V>public ObjectOrderedSet<Object2ObjectMap.Entry<T,V>> object2ObjectEntrySet()
Object2ObjectMapobject2ObjectEntrySet in interface Object2ObjectMap<T,V>object2ObjectEntrySet in interface Object2ObjectOrderedMap<T,V>object2ObjectEntrySet in class Object2ObjectOpenCustomHashMap<T,V>public ObjectOrderedSet<T> keySet()
keySet in interface java.util.Map<T,V>keySet in interface Object2ObjectMap<T,V>keySet in interface Object2ObjectOrderedMap<T,V>keySet in class Object2ObjectOpenCustomHashMap<T,V>public ObjectCollection<V> values()
values in interface java.util.Map<T,V>values in interface Object2ObjectMap<T,V>values in class Object2ObjectOpenCustomHashMap<T,V>public void forEach(ObjectObjectConsumer<T,V> action)
Object2ObjectMapforEach in interface Object2ObjectMap<T,V>forEach in class Object2ObjectOpenCustomHashMap<T,V>action - processor of the values that are iterator overpublic void clear()
public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Object2ObjectOpenCustomHashMap<T,V>size - the amount of elements that should be allowed