V - the keyType of elements maintained by this Collectionpublic class Double2ObjectLinkedOpenCustomHashMap<V> extends Double2ObjectOpenCustomHashMap<V> implements Double2ObjectOrderedMap<V>
AbstractDouble2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ObjectOrderedMap.FastOrderedSet<V>Double2ObjectMap.BuilderCache<V>, Double2ObjectMap.Entry<V>, Double2ObjectMap.FastEntrySet<V>, Double2ObjectMap.MapBuilder| Constructor and Description |
|---|
Double2ObjectLinkedOpenCustomHashMap(double[] keys,
V[] values,
DoubleStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Double2ObjectLinkedOpenCustomHashMap(java.lang.Double[] keys,
V[] values,
DoubleStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2ObjectLinkedOpenCustomHashMap(double[] keys,
V[] values,
float loadFactor,
DoubleStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Double2ObjectLinkedOpenCustomHashMap(java.lang.Double[] keys,
V[] values,
float loadFactor,
DoubleStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2ObjectLinkedOpenCustomHashMap(Double2ObjectMap<V> map,
DoubleStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2ObjectLinkedOpenCustomHashMap(Double2ObjectMap<V> map,
float loadFactor,
DoubleStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2ObjectLinkedOpenCustomHashMap(DoubleStrategy strategy)
Default Constructor
|
Double2ObjectLinkedOpenCustomHashMap(int minCapacity,
DoubleStrategy strategy)
Constructor that defines the minimum capacity
|
Double2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
DoubleStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Double2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Double,? extends V> map,
DoubleStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Double2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Double,? extends V> map,
float loadFactor,
DoubleStrategy 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
|
Double2ObjectLinkedOpenCustomHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectOrderedSet<Double2ObjectMap.Entry<V>> |
double2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(DoubleObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(double key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(double key)
A Specific get method that allows to move teh given key/value int the last index.
|
DoubleOrderedSet |
keySet() |
double |
lastDoubleKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(double key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(double key)
A specific move method to move a given key/value to the last index.
|
double |
pollFirstDoubleKey()
A method to get and remove the first Key of a Map.
|
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(double key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(double 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 Double2ObjectLinkedOpenCustomHashMap(DoubleStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Double2ObjectLinkedOpenCustomHashMap(int minCapacity,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(java.lang.Double[] keys,
V[] values,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(java.lang.Double[] keys,
V[] values,
float loadFactor,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(double[] keys,
V[] values,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(double[] keys,
V[] values,
float loadFactor,
DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Double,? extends V> map, DoubleStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Double2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Double,? extends V> map, float loadFactor, DoubleStrategy 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 Double2ObjectLinkedOpenCustomHashMap(Double2ObjectMap<V> map, DoubleStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Double2ObjectLinkedOpenCustomHashMap(Double2ObjectMap<V> map, float loadFactor, DoubleStrategy 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(double key, V value)
Double2ObjectOrderedMapputAndMoveToFirst in interface Double2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(double key, V value)
Double2ObjectOrderedMapputAndMoveToLast in interface Double2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(double key)
Double2ObjectOrderedMapmoveToFirst in interface Double2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(double key)
Double2ObjectOrderedMapmoveToLast in interface Double2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(double key)
Double2ObjectOrderedMapgetAndMoveToFirst in interface Double2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(double key)
Double2ObjectOrderedMapgetAndMoveToLast in interface Double2ObjectOrderedMap<V>key - that is searched forpublic Double2ObjectLinkedOpenCustomHashMap<V> copy()
Double2ObjectMapcopy in interface Double2ObjectMap<V>copy in interface Double2ObjectOrderedMap<V>copy in class Double2ObjectOpenCustomHashMap<V>public double firstDoubleKey()
Double2ObjectOrderedMapfirstDoubleKey in interface Double2ObjectOrderedMap<V>public double pollFirstDoubleKey()
Double2ObjectOrderedMappollFirstDoubleKey in interface Double2ObjectOrderedMap<V>public double lastDoubleKey()
Double2ObjectOrderedMaplastDoubleKey in interface Double2ObjectOrderedMap<V>public double pollLastDoubleKey()
Double2ObjectOrderedMappollLastDoubleKey in interface Double2ObjectOrderedMap<V>public V firstValue()
Double2ObjectOrderedMapfirstValue in interface Double2ObjectOrderedMap<V>public V lastValue()
Double2ObjectOrderedMaplastValue in interface Double2ObjectOrderedMap<V>public ObjectOrderedSet<Double2ObjectMap.Entry<V>> double2ObjectEntrySet()
Double2ObjectMapdouble2ObjectEntrySet in interface Double2ObjectMap<V>double2ObjectEntrySet in interface Double2ObjectOrderedMap<V>double2ObjectEntrySet in class Double2ObjectOpenCustomHashMap<V>public DoubleOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Double,V>keySet in interface Double2ObjectMap<V>keySet in interface Double2ObjectOrderedMap<V>keySet in class Double2ObjectOpenCustomHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Double,V>values in interface Double2ObjectMap<V>values in class Double2ObjectOpenCustomHashMap<V>public void forEach(DoubleObjectConsumer<V> action)
Double2ObjectMapforEach in interface Double2ObjectMap<V>forEach in class Double2ObjectOpenCustomHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Double,V>clear in class Double2ObjectOpenCustomHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Double2ObjectOpenCustomHashMap<V>size - the amount of elements that should be allowed