V - the type of elements maintained by this Collectionpublic class Byte2ObjectLinkedOpenCustomHashMap<V> extends Byte2ObjectOpenCustomHashMap<V> implements Byte2ObjectOrderedMap<V>
AbstractByte2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ObjectOrderedMap.FastOrderedSet<V>Byte2ObjectMap.BuilderCache<V>, Byte2ObjectMap.Entry<V>, Byte2ObjectMap.FastEntrySet<V>, Byte2ObjectMap.MapBuilder| Constructor and Description |
|---|
Byte2ObjectLinkedOpenCustomHashMap(byte[] keys,
V[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2ObjectLinkedOpenCustomHashMap(java.lang.Byte[] keys,
V[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2ObjectLinkedOpenCustomHashMap(byte[] keys,
V[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2ObjectLinkedOpenCustomHashMap(java.lang.Byte[] keys,
V[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2ObjectLinkedOpenCustomHashMap(Byte2ObjectMap<V> map,
ByteStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2ObjectLinkedOpenCustomHashMap(Byte2ObjectMap<V> map,
float loadFactor,
ByteStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2ObjectLinkedOpenCustomHashMap(ByteStrategy strategy)
Default Constructor
|
Byte2ObjectLinkedOpenCustomHashMap(int minCapacity,
ByteStrategy strategy)
Constructor that defines the minimum capacity
|
Byte2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ByteStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Byte2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends V> map,
ByteStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends V> map,
float loadFactor,
ByteStrategy 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<Byte2ObjectMap.Entry<V>> |
byte2ObjectEntrySet()
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
|
Byte2ObjectLinkedOpenCustomHashMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
firstByteKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(ByteObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(byte key)
A Specific get method that allows to move teh given key/value int the last index.
|
ByteOrderedSet |
keySet() |
byte |
lastByteKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
boolean |
moveToFirst(byte key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(byte key)
A specific move method to move a given key/value to the last index.
|
byte |
pollFirstByteKey()
A method to get and remove the first Key of a Map.
|
byte |
pollLastByteKey()
A method to get and remove the last Key of a Map.
|
V |
putAndMoveToFirst(byte key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(byte 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, unmodifiablebuilder, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, containsKey, containsKey, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, merge, mergeAll, 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 Byte2ObjectLinkedOpenCustomHashMap(ByteStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Byte2ObjectLinkedOpenCustomHashMap(int minCapacity,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(java.lang.Byte[] keys,
V[] values,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(java.lang.Byte[] keys,
V[] values,
float loadFactor,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(byte[] keys,
V[] values,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(byte[] keys,
V[] values,
float loadFactor,
ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends V> map, ByteStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Byte2ObjectLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends V> map, float loadFactor, ByteStrategy 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 Byte2ObjectLinkedOpenCustomHashMap(Byte2ObjectMap<V> map, ByteStrategy strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Byte2ObjectLinkedOpenCustomHashMap(Byte2ObjectMap<V> map, float loadFactor, ByteStrategy 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(byte key, V value)
Byte2ObjectOrderedMapputAndMoveToFirst in interface Byte2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(byte key, V value)
Byte2ObjectOrderedMapputAndMoveToLast in interface Byte2ObjectOrderedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2ObjectOrderedMapmoveToFirst in interface Byte2ObjectOrderedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2ObjectOrderedMapmoveToLast in interface Byte2ObjectOrderedMap<V>key - that should be moved to the first lastpublic V getAndMoveToFirst(byte key)
Byte2ObjectOrderedMapgetAndMoveToFirst in interface Byte2ObjectOrderedMap<V>key - that is searched forpublic V getAndMoveToLast(byte key)
Byte2ObjectOrderedMapgetAndMoveToLast in interface Byte2ObjectOrderedMap<V>key - that is searched forpublic Byte2ObjectLinkedOpenCustomHashMap<V> copy()
Byte2ObjectMapcopy in interface Byte2ObjectMap<V>copy in interface Byte2ObjectOrderedMap<V>copy in class Byte2ObjectOpenCustomHashMap<V>public byte firstByteKey()
Byte2ObjectOrderedMapfirstByteKey in interface Byte2ObjectOrderedMap<V>public byte pollFirstByteKey()
Byte2ObjectOrderedMappollFirstByteKey in interface Byte2ObjectOrderedMap<V>public byte lastByteKey()
Byte2ObjectOrderedMaplastByteKey in interface Byte2ObjectOrderedMap<V>public byte pollLastByteKey()
Byte2ObjectOrderedMappollLastByteKey in interface Byte2ObjectOrderedMap<V>public V firstValue()
Byte2ObjectOrderedMapfirstValue in interface Byte2ObjectOrderedMap<V>public V lastValue()
Byte2ObjectOrderedMaplastValue in interface Byte2ObjectOrderedMap<V>public ObjectOrderedSet<Byte2ObjectMap.Entry<V>> byte2ObjectEntrySet()
Byte2ObjectMapbyte2ObjectEntrySet in interface Byte2ObjectMap<V>byte2ObjectEntrySet in interface Byte2ObjectOrderedMap<V>byte2ObjectEntrySet in class Byte2ObjectOpenCustomHashMap<V>public ByteOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Byte,V>keySet in interface Byte2ObjectMap<V>keySet in interface Byte2ObjectOrderedMap<V>keySet in class Byte2ObjectOpenCustomHashMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Byte,V>values in interface Byte2ObjectMap<V>values in class Byte2ObjectOpenCustomHashMap<V>public void forEach(ByteObjectConsumer<V> action)
Byte2ObjectMapforEach in interface Byte2ObjectMap<V>forEach in class Byte2ObjectOpenCustomHashMap<V>action - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Byte,V>clear in class Byte2ObjectOpenCustomHashMap<V>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Byte2ObjectOpenCustomHashMap<V>size - the amount of elements that should be allowed