public class Byte2ByteLinkedOpenCustomHashMap extends Byte2ByteOpenCustomHashMap implements Byte2ByteOrderedMap
AbstractByte2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ByteOrderedMap.FastOrderedSetByte2ByteMap.BuilderCache, Byte2ByteMap.Entry, Byte2ByteMap.FastEntrySet, Byte2ByteMap.MapBuilder| Constructor and Description |
|---|
Byte2ByteLinkedOpenCustomHashMap(byte[] keys,
byte[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2ByteLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Byte[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2ByteLinkedOpenCustomHashMap(byte[] keys,
byte[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2ByteLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Byte[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2ByteLinkedOpenCustomHashMap(Byte2ByteMap map,
ByteStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2ByteLinkedOpenCustomHashMap(Byte2ByteMap 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.
|
Byte2ByteLinkedOpenCustomHashMap(ByteStrategy strategy)
Default Constructor
|
Byte2ByteLinkedOpenCustomHashMap(int minCapacity,
ByteStrategy strategy)
Constructor that defines the minimum capacity
|
Byte2ByteLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ByteStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Byte2ByteLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> map,
ByteStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2ByteLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> 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<Byte2ByteMap.Entry> |
byte2ByteEntrySet()
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
|
Byte2ByteLinkedOpenCustomHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
firstByteKey()
A method to get the first Key of a Map.
|
byte |
firstByteValue()
A method to get the first Value of a Map.
|
void |
forEach(ByteByteConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
byte |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
byte |
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.
|
byte |
lastByteValue()
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.
|
byte |
putAndMoveToFirst(byte key,
byte value)
A customized put method that allows you to insert into the first index.
|
byte |
putAndMoveToLast(byte key,
byte value)
A customized put method that allows you to insert into the last index.
|
ByteCollection |
values() |
addTo, computeByte, computeByteIfAbsent, computeByteIfPresent, containsKey, containsKey, containsValue, containsValue, get, get, getOrDefault, mergeAllByte, mergeByte, put, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, size, subFrom, supplyByteIfAbsent, trimaddToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceBytes, replaceBytes, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddTo, addToAll, applyAsByte, builder, compute, computeByte, computeByteIfAbsent, computeByteIfPresent, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, mergeAllByte, mergeByte, put, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, replace, replace, replaceAll, replaceBytes, replaceBytes, setDefaultReturnValue, subFrom, supplyByteIfAbsentandThen, compose, identityclearAndTrim, trimpublic Byte2ByteLinkedOpenCustomHashMap(ByteStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Byte2ByteLinkedOpenCustomHashMap(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 Byte2ByteLinkedOpenCustomHashMap(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 Byte2ByteLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Byte[] 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 Byte2ByteLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Byte[] 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 Byte2ByteLinkedOpenCustomHashMap(byte[] keys,
byte[] 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 Byte2ByteLinkedOpenCustomHashMap(byte[] keys,
byte[] 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 Byte2ByteLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> 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 Byte2ByteLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Byte> 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 Byte2ByteLinkedOpenCustomHashMap(Byte2ByteMap 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 Byte2ByteLinkedOpenCustomHashMap(Byte2ByteMap 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 byte putAndMoveToFirst(byte key,
byte value)
Byte2ByteOrderedMapputAndMoveToFirst in interface Byte2ByteOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public byte putAndMoveToLast(byte key,
byte value)
Byte2ByteOrderedMapputAndMoveToLast in interface Byte2ByteOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2ByteOrderedMapmoveToFirst in interface Byte2ByteOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2ByteOrderedMapmoveToLast in interface Byte2ByteOrderedMapkey - that should be moved to the first lastpublic byte getAndMoveToFirst(byte key)
Byte2ByteOrderedMapgetAndMoveToFirst in interface Byte2ByteOrderedMapkey - that is searched forpublic byte getAndMoveToLast(byte key)
Byte2ByteOrderedMapgetAndMoveToLast in interface Byte2ByteOrderedMapkey - that is searched forpublic Byte2ByteLinkedOpenCustomHashMap copy()
Byte2ByteMapcopy in interface Byte2ByteMapcopy in interface Byte2ByteOrderedMapcopy in class Byte2ByteOpenCustomHashMappublic byte firstByteKey()
Byte2ByteOrderedMapfirstByteKey in interface Byte2ByteOrderedMappublic byte pollFirstByteKey()
Byte2ByteOrderedMappollFirstByteKey in interface Byte2ByteOrderedMappublic byte lastByteKey()
Byte2ByteOrderedMaplastByteKey in interface Byte2ByteOrderedMappublic byte pollLastByteKey()
Byte2ByteOrderedMappollLastByteKey in interface Byte2ByteOrderedMappublic byte firstByteValue()
Byte2ByteOrderedMapfirstByteValue in interface Byte2ByteOrderedMappublic byte lastByteValue()
Byte2ByteOrderedMaplastByteValue in interface Byte2ByteOrderedMappublic ObjectOrderedSet<Byte2ByteMap.Entry> byte2ByteEntrySet()
Byte2ByteMapbyte2ByteEntrySet in interface Byte2ByteMapbyte2ByteEntrySet in interface Byte2ByteOrderedMapbyte2ByteEntrySet in class Byte2ByteOpenCustomHashMappublic ByteOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Byte>keySet in interface Byte2ByteMapkeySet in interface Byte2ByteOrderedMapkeySet in class Byte2ByteOpenCustomHashMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Byte>values in interface Byte2ByteMapvalues in class Byte2ByteOpenCustomHashMappublic void forEach(ByteByteConsumer action)
Byte2ByteMapforEach in interface Byte2ByteMapforEach in class Byte2ByteOpenCustomHashMapaction - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Byte>clear in class Byte2ByteOpenCustomHashMappublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Byte2ByteOpenCustomHashMapsize - the amount of elements that should be allowed