public class Byte2LongLinkedOpenCustomHashMap extends Byte2LongOpenCustomHashMap implements Byte2LongOrderedMap
AbstractByte2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2LongOrderedMap.FastOrderedSetByte2LongMap.BuilderCache, Byte2LongMap.Entry, Byte2LongMap.FastEntrySet, Byte2LongMap.MapBuilder| Constructor and Description |
|---|
Byte2LongLinkedOpenCustomHashMap(byte[] keys,
long[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2LongLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Long[] values,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2LongLinkedOpenCustomHashMap(byte[] keys,
long[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from unboxed values
|
Byte2LongLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Long[] values,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2LongLinkedOpenCustomHashMap(Byte2LongMap map,
ByteStrategy strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2LongLinkedOpenCustomHashMap(Byte2LongMap 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.
|
Byte2LongLinkedOpenCustomHashMap(ByteStrategy strategy)
Default Constructor
|
Byte2LongLinkedOpenCustomHashMap(int minCapacity,
ByteStrategy strategy)
Constructor that defines the minimum capacity
|
Byte2LongLinkedOpenCustomHashMap(int minCapacity,
float loadFactor,
ByteStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
Byte2LongLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> map,
ByteStrategy strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2LongLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> 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<Byte2LongMap.Entry> |
byte2LongEntrySet()
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
|
Byte2LongLinkedOpenCustomHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
firstByteKey()
A method to get the first Key of a Map.
|
long |
firstLongValue()
A method to get the first Value of a Map.
|
void |
forEach(ByteLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
long |
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.
|
long |
lastLongValue()
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.
|
long |
putAndMoveToFirst(byte key,
long value)
A customized put method that allows you to insert into the first index.
|
long |
putAndMoveToLast(byte key,
long value)
A customized put method that allows you to insert into the last index.
|
LongCollection |
values() |
addTo, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsKey, containsValue, containsValue, get, get, getOrDefault, mergeAllLong, mergeLong, put, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, size, subFrom, supplyLongIfAbsent, trimaddToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceLongs, replaceLongs, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddTo, addToAll, builder, compute, computeIfAbsent, computeIfPresent, computeLong, computeLongIfAbsent, computeLongIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, get, get, getDefaultReturnValue, getOrDefault, getOrDefault, merge, mergeAllLong, mergeLong, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, putIfAbsent, remove, remove, remove, remove, removeOrDefault, replace, replace, replace, replace, replaceAll, replaceLongs, replaceLongs, setDefaultReturnValue, subFrom, supplyLongIfAbsentclearAndTrim, trimpublic Byte2LongLinkedOpenCustomHashMap(ByteStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Byte2LongLinkedOpenCustomHashMap(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 Byte2LongLinkedOpenCustomHashMap(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 Byte2LongLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Long[] 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 Byte2LongLinkedOpenCustomHashMap(java.lang.Byte[] keys,
java.lang.Long[] 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 Byte2LongLinkedOpenCustomHashMap(byte[] keys,
long[] 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 Byte2LongLinkedOpenCustomHashMap(byte[] keys,
long[] 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 Byte2LongLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> 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 Byte2LongLinkedOpenCustomHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> 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 Byte2LongLinkedOpenCustomHashMap(Byte2LongMap 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 Byte2LongLinkedOpenCustomHashMap(Byte2LongMap 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 long putAndMoveToFirst(byte key,
long value)
Byte2LongOrderedMapputAndMoveToFirst in interface Byte2LongOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public long putAndMoveToLast(byte key,
long value)
Byte2LongOrderedMapputAndMoveToLast in interface Byte2LongOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2LongOrderedMapmoveToFirst in interface Byte2LongOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2LongOrderedMapmoveToLast in interface Byte2LongOrderedMapkey - that should be moved to the first lastpublic long getAndMoveToFirst(byte key)
Byte2LongOrderedMapgetAndMoveToFirst in interface Byte2LongOrderedMapkey - that is searched forpublic long getAndMoveToLast(byte key)
Byte2LongOrderedMapgetAndMoveToLast in interface Byte2LongOrderedMapkey - that is searched forpublic Byte2LongLinkedOpenCustomHashMap copy()
Byte2LongMapcopy in interface Byte2LongMapcopy in interface Byte2LongOrderedMapcopy in class Byte2LongOpenCustomHashMappublic byte firstByteKey()
Byte2LongOrderedMapfirstByteKey in interface Byte2LongOrderedMappublic byte pollFirstByteKey()
Byte2LongOrderedMappollFirstByteKey in interface Byte2LongOrderedMappublic byte lastByteKey()
Byte2LongOrderedMaplastByteKey in interface Byte2LongOrderedMappublic byte pollLastByteKey()
Byte2LongOrderedMappollLastByteKey in interface Byte2LongOrderedMappublic long firstLongValue()
Byte2LongOrderedMapfirstLongValue in interface Byte2LongOrderedMappublic long lastLongValue()
Byte2LongOrderedMaplastLongValue in interface Byte2LongOrderedMappublic ObjectOrderedSet<Byte2LongMap.Entry> byte2LongEntrySet()
Byte2LongMapbyte2LongEntrySet in interface Byte2LongMapbyte2LongEntrySet in interface Byte2LongOrderedMapbyte2LongEntrySet in class Byte2LongOpenCustomHashMappublic ByteOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Long>keySet in interface Byte2LongMapkeySet in interface Byte2LongOrderedMapkeySet in class Byte2LongOpenCustomHashMappublic LongCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Long>values in interface Byte2LongMapvalues in class Byte2LongOpenCustomHashMappublic void forEach(ByteLongConsumer action)
Byte2LongMapforEach in interface Byte2LongMapforEach in class Byte2LongOpenCustomHashMapaction - processor of the values that are iterator overpublic void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Long>clear in class Byte2LongOpenCustomHashMappublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class Byte2LongOpenCustomHashMapsize - the amount of elements that should be allowed