public class Byte2FloatConcurrentOpenHashMap extends AbstractByte2FloatMap implements Byte2FloatConcurrentMap, ITrimmable
AbstractByte2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2FloatMap.BuilderCache, Byte2FloatMap.Entry, Byte2FloatMap.FastEntrySet, Byte2FloatMap.MapBuilder| Constructor and Description |
|---|
Byte2FloatConcurrentOpenHashMap()
Default Constructor
|
Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
float loadFactor,
int concurrencyLevel)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
float loadFactor,
int concurrencyLevel)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
int concurrencyLevel)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
int concurrencyLevel)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map,
float loadFactor,
int concurrencyLevel)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map,
int concurrencyLevel)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(float loadFactor,
int concurrencyLevel)
Constructor that defines the load factor and concurrencyLevel
|
Byte2FloatConcurrentOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Byte2FloatConcurrentOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Byte2FloatConcurrentOpenHashMap(int minCapacity,
float loadFactor,
int concurrencyLevel)
Constructor that defines the minimum capacity, load factor and concurrencyLevel
|
Byte2FloatConcurrentOpenHashMap(int minCapacity,
int concurrencyLevel)
Constructor that defines the minimum capacity and concurrencyLevel
|
Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
float loadFactor,
int concurrencyLevel)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
int concurrencyLevel)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(byte key,
float value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2FloatMap.Entry> |
byte2FloatEntrySet()
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
|
float |
computeFloat(byte key,
ByteFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(byte key,
Byte2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(byte key,
ByteFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
Byte2FloatConcurrentOpenHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(ByteFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Float |
get(java.lang.Object key) |
float |
getOrDefault(byte key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
boolean |
isEmpty() |
ByteSet |
keySet() |
float |
mergeFloat(byte key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
float |
removeOrDefault(byte key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(byte key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
float |
subFrom(byte key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(byte key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
FloatCollection |
values() |
addToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, mergeAllFloat, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceFloats, replaceFloats, setDefaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replace, replace, replaceAlladdToAll, applyAsFloat, builder, containsKey, containsValue, entrySet, getDefaultReturnValue, mergeAllFloat, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceFloats, replaceFloats, setDefaultReturnValue, synchronize, synchronize, unmodifiableclearAndTrim, trimpublic Byte2FloatConcurrentOpenHashMap()
public Byte2FloatConcurrentOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Byte2FloatConcurrentOpenHashMap(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Byte2FloatConcurrentOpenHashMap(int minCapacity,
int concurrencyLevel)
minCapacity - the minimum capacity the HashMap is allowed to be.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(float loadFactor,
int concurrencyLevel)
loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(int minCapacity,
float loadFactor,
int concurrencyLevel)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
float loadFactor)
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 resizejava.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 Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(java.lang.Byte[] keys,
java.lang.Float[] values,
float loadFactor,
int concurrencyLevel)
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 resizeconcurrencyLevel - decides how many operations can be performed at once.java.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 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
float loadFactor)
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 resizejava.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 Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(byte[] keys,
float[] values,
float loadFactor,
int concurrencyLevel)
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 resizeconcurrencyLevel - decides how many operations can be performed at once.java.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 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
int concurrencyLevel)
map - the values that should be present in the mapconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map,
float loadFactor,
int concurrencyLevel)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map)
map - the values that should be present in the mappublic Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map, int concurrencyLevel)
map - the values that should be present in the mapconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Byte2FloatConcurrentOpenHashMap(Byte2FloatMap map, float loadFactor, int concurrencyLevel)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public float put(byte key,
float value)
Byte2FloatMapput in interface Byte2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(byte key,
float value)
Byte2FloatMapputIfAbsent in interface Byte2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(byte key,
float value)
Byte2FloatMapaddTo in interface Byte2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(byte key,
float value)
Byte2FloatMapByte2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Byte2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic float remove(byte key)
Byte2FloatMapremove in interface Byte2FloatMapkey - the element that should be removedpublic boolean remove(byte key,
float value)
Byte2FloatMapremove in interface Byte2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.concurrent.ConcurrentMap<java.lang.Byte,java.lang.Float>remove in interface java.util.Map<java.lang.Byte,java.lang.Float>remove in interface Byte2FloatConcurrentMapremove in interface Byte2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float removeOrDefault(byte key,
float defaultValue)
Byte2FloatMapremoveOrDefault in interface Byte2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public float get(byte key)
Byte2FloatMapget in interface Byte2FloatMapkey - the key that is searched forpublic java.lang.Float get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Float>get in interface Byte2FloatMapget in class AbstractByte2FloatMappublic float getOrDefault(byte key,
float defaultValue)
Byte2FloatMapgetOrDefault in interface Byte2FloatMapgetOrDefault in class AbstractByte2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ByteFloatConsumer action)
Byte2FloatMapforEach in interface Byte2FloatMapforEach in class AbstractByte2FloatMapaction - processor of the values that are iterator overpublic Byte2FloatConcurrentOpenHashMap copy()
Byte2FloatMapcopy in interface Byte2FloatMapcopy in class AbstractByte2FloatMappublic boolean containsKey(byte key)
Byte2FloatMapcontainsKey in interface Byte2FloatMapcontainsKey in class AbstractByte2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Byte2FloatMapcontainsValue in interface Byte2FloatMapcontainsValue in class AbstractByte2FloatMapvalue - element that is searched forpublic boolean replace(byte key,
float oldValue,
float newValue)
Byte2FloatMapreplace in interface Byte2FloatMapreplace in class AbstractByte2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(byte key,
float value)
Byte2FloatMapreplace in interface Byte2FloatMapreplace in class AbstractByte2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(byte key,
ByteFloatUnaryOperator mappingFunction)
Byte2FloatMapcomputeFloat in interface Byte2FloatMapcomputeFloat in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(byte key,
Byte2FloatFunction mappingFunction)
Byte2FloatMapcomputeFloatIfAbsent in interface Byte2FloatMapcomputeFloatIfAbsent in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(byte key,
FloatSupplier valueProvider)
Byte2FloatMapsupplyFloatIfAbsent in interface Byte2FloatMapsupplyFloatIfAbsent in class AbstractByte2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(byte key,
ByteFloatUnaryOperator mappingFunction)
Byte2FloatMapcomputeFloatIfPresent in interface Byte2FloatMapcomputeFloatIfPresent in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(byte key,
float value,
FloatFloatUnaryOperator mappingFunction)
Byte2FloatMapmergeFloat in interface Byte2FloatMapmergeFloat in class AbstractByte2FloatMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>public boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.Byte,java.lang.Float>isEmpty in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>public int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Float>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>public ObjectSet<Byte2FloatMap.Entry> byte2FloatEntrySet()
Byte2FloatMapbyte2FloatEntrySet in interface Byte2FloatMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Float>keySet in interface Byte2FloatMapkeySet in class AbstractByte2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Float>values in interface Byte2FloatMapvalues in class AbstractByte2FloatMap