V - the keyType of elements maintained by this Collectionpublic class Char2ObjectLinkedOpenCustomHashMap<V> extends Char2ObjectOpenCustomHashMap<V> implements Char2ObjectOrderedMap<V>
AbstractChar2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ObjectOrderedMap.FastOrderedSet<V>Char2ObjectMap.BuilderCache<V>, Char2ObjectMap.Entry<V>, Char2ObjectMap.FastEntrySet<V>, Char2ObjectMap.MapBuilder| Constructor and Description |
|---|
Char2ObjectLinkedOpenCustomHashMap(char[] keys,
V[] values,
CharStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Char2ObjectLinkedOpenCustomHashMap(char[] keys,
V[] values,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Char2ObjectLinkedOpenCustomHashMap(Char2ObjectMap<V> map,
CharStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2ObjectLinkedOpenCustomHashMap(Char2ObjectMap<V> map,
float loadFactor,
CharStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2ObjectLinkedOpenCustomHashMap(java.lang.Character[] keys,
V[] values,
CharStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2ObjectLinkedOpenCustomHashMap(java.lang.Character[] keys,
V[] values,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2ObjectLinkedOpenCustomHashMap(CharStrategy strategy)
Default Constructor
|
Char2ObjectLinkedOpenCustomHashMap(int minCapacity,
CharStrategy strategy)
Constructor that defines the minimum capacity
|
Char2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
CharStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Char2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Character,? extends V> map,
CharStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Char2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Character,? extends V> map,
float loadFactor,
CharStrategy 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 |
|---|---|
ObjectOrderedSet<Char2ObjectMap.Entry<V>> |
char2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
Char2ObjectLinkedOpenCustomHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
char |
firstCharKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(CharObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(char key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(char key)
A Specific get method that allows to move teh given key/value int the last index.
|
CharOrderedSet |
keySet() |
char |
lastCharKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(char key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(char key)
A specific move method to move a given key/value to the last index.
|
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(char key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(char 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 Char2ObjectLinkedOpenCustomHashMap(CharStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Char2ObjectLinkedOpenCustomHashMap(int minCapacity,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(java.lang.Character[] keys,
V[] values,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(java.lang.Character[] keys,
V[] values,
float loadFactor,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(char[] keys,
V[] values,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(char[] keys,
V[] values,
float loadFactor,
CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Character,? extends V> map, CharStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Char2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Character,? extends V> map, float loadFactor, CharStrategy 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 Char2ObjectLinkedOpenCustomHashMap(Char2ObjectMap<V> map, CharStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Char2ObjectLinkedOpenCustomHashMap(Char2ObjectMap<V> map, float loadFactor, CharStrategy 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(char key, V value)
Char2ObjectOrderedMapputAndMoveToFirst in interface Char2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(char key, V value)
Char2ObjectOrderedMapputAndMoveToLast in interface Char2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(char key)
Char2ObjectOrderedMapmoveToFirst in interface Char2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(char key)
Char2ObjectOrderedMapmoveToLast in interface Char2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(char key)
Char2ObjectOrderedMapgetAndMoveToFirst in interface Char2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(char key)
Char2ObjectOrderedMapgetAndMoveToLast in interface Char2ObjectOrderedMap<V>key - that is searched forpublic Char2ObjectLinkedOpenCustomHashMap<V> copy()
Char2ObjectMapcopy in interface Char2ObjectMap<V>copy in interface Char2ObjectOrderedMap<V>copy in class Char2ObjectOpenCustomHashMap<V>public char firstCharKey()
Char2ObjectOrderedMapfirstCharKey in interface Char2ObjectOrderedMap<V>public char pollFirstCharKey()
Char2ObjectOrderedMappollFirstCharKey in interface Char2ObjectOrderedMap<V>public char lastCharKey()
Char2ObjectOrderedMaplastCharKey in interface Char2ObjectOrderedMap<V>public char pollLastCharKey()
Char2ObjectOrderedMappollLastCharKey in interface Char2ObjectOrderedMap<V>public V firstValue()
Char2ObjectOrderedMapfirstValue in interface Char2ObjectOrderedMap<V>public V lastValue()
Char2ObjectOrderedMaplastValue in interface Char2ObjectOrderedMap<V>public ObjectOrderedSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
Char2ObjectMapchar2ObjectEntrySet in interface Char2ObjectMap<V>char2ObjectEntrySet in interface Char2ObjectOrderedMap<V>char2ObjectEntrySet in class Char2ObjectOpenCustomHashMap<V>public CharOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Character,V>keySet in interface Char2ObjectMap<V>keySet in interface Char2ObjectOrderedMap<V>keySet in class Char2ObjectOpenCustomHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>values in interface Char2ObjectMap<V>values in class Char2ObjectOpenCustomHashMap<V>public void forEach(CharObjectConsumer<V> action)
Char2ObjectMapforEach in interface Char2ObjectMap<V>forEach in class Char2ObjectOpenCustomHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Character,V>clear in class Char2ObjectOpenCustomHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Char2ObjectOpenCustomHashMap<V>size - the amount of elements that should be allowed