public class Byte2FloatArrayMap extends AbstractByte2FloatMap implements Byte2FloatSortedMap
AbstractByte2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2FloatSortedMap.FastSortedSetByte2FloatMap.Entry, Byte2FloatMap.FastEntrySet| Constructor and Description |
|---|
Byte2FloatArrayMap()
Default Constructor
|
Byte2FloatArrayMap(byte[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatArrayMap(java.lang.Byte[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2FloatArrayMap(byte[] keys,
float[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Byte2FloatArrayMap(java.lang.Byte[] keys,
java.lang.Float[] values,
int length)
Helper constructor that allow to create a map from boxed values (it will unbox them) with a custom length
|
Byte2FloatArrayMap(Byte2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2FloatArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Byte2FloatArrayMap(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.
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(byte key,
float value)
A Helper method to add a primitives together.
|
ObjectSortedSet<Byte2FloatMap.Entry> |
byte2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
ByteComparator |
comparator() |
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 |
containsKey(java.lang.Object key) |
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
byte |
firstByteKey()
A method to get the first Key of a Map.
|
float |
firstFloatValue()
A method to get the first Value of a Map.
|
void |
forEach(ByteFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
float |
getAndMoveToLast(byte key)
A Specific get method that allows to move teh given key/value int the last index.
|
float |
getFloat(byte key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(byte key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Byte2FloatSortedMap |
headMap(byte toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
ByteSet |
keySet() |
byte |
lastByteKey()
A method to get the last Key of a Map.
|
float |
lastFloatValue()
A method to get the last Value of a Map.
|
void |
mergeAllFloat(Byte2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(byte key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
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.
|
float |
put(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putAndMoveToFirst(byte key,
float value)
A customized put method that allows you to insert into the first index.
|
float |
putAndMoveToLast(byte key,
float value)
A customized put method that allows you to insert into the last index.
|
float |
putIfAbsent(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remByte(byte key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remByteOrDefault(byte key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(byte key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Float |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
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() |
Byte2FloatSortedMap |
subMap(byte fromKey,
byte toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Byte2FloatSortedMap |
tailMap(byte fromKey)
A Type Specific TailMap method to reduce boxing/unboxing
|
FloatCollection |
values() |
addToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceFloats, replaceFloats, setDefaultReturnValuefirstKey, headMap, lastKey, subMap, tailMapaddToAll, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceFloats, replaceFloats, setDefaultReturnValuepublic Byte2FloatArrayMap()
public Byte2FloatArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Byte2FloatArrayMap(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 lengthpublic Byte2FloatArrayMap(java.lang.Byte[] keys,
java.lang.Float[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lengthpublic Byte2FloatArrayMap(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 Byte2FloatArrayMap(byte[] keys,
float[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Byte2FloatArrayMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Byte2FloatArrayMap(Byte2FloatMap map)
map - the values that should be present in the mappublic 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 putAndMoveToFirst(byte key,
float value)
Byte2FloatSortedMapputAndMoveToFirst in interface Byte2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(byte key,
float value)
Byte2FloatSortedMapputAndMoveToLast in interface Byte2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2FloatSortedMapmoveToFirst in interface Byte2FloatSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2FloatSortedMapmoveToLast in interface Byte2FloatSortedMapkey - that should be moved to the first lastpublic 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 containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Byte,java.lang.Float>containsKey in interface Byte2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>key - that is searched for.Map.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Byte,java.lang.Float>containsValue in interface Byte2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>value - that is searched for.Map.containsValue(Object)public float getFloat(byte key)
Byte2FloatMapgetFloat in interface Byte2FloatFunctiongetFloat in interface Byte2FloatMapkey - the key that is searched forpublic 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 float getAndMoveToFirst(byte key)
Byte2FloatSortedMapgetAndMoveToFirst in interface Byte2FloatSortedMapkey - that is searched forpublic float getAndMoveToLast(byte key)
Byte2FloatSortedMapgetAndMoveToLast in interface Byte2FloatSortedMapkey - that is searched forpublic byte firstByteKey()
Byte2FloatSortedMapfirstByteKey in interface Byte2FloatSortedMappublic byte lastByteKey()
Byte2FloatSortedMaplastByteKey in interface Byte2FloatSortedMappublic float firstFloatValue()
Byte2FloatSortedMapfirstFloatValue in interface Byte2FloatSortedMappublic float lastFloatValue()
Byte2FloatSortedMaplastFloatValue in interface Byte2FloatSortedMappublic byte pollFirstByteKey()
Byte2FloatSortedMappollFirstByteKey in interface Byte2FloatSortedMappublic byte pollLastByteKey()
Byte2FloatSortedMappollLastByteKey in interface Byte2FloatSortedMappublic float remByte(byte key)
Byte2FloatMapremByte in interface Byte2FloatMapkey - the element that should be removedpublic float remByteOrDefault(byte key,
float defaultValue)
Byte2FloatMapremByteOrDefault 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 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 java.lang.Float remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Byte,java.lang.Float>remove in interface Byte2FloatMapremove in class java.util.AbstractMap<java.lang.Byte,java.lang.Float>key - the element that should be removedMap.remove(Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Byte,java.lang.Float>remove in interface Byte2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(ByteFloatConsumer action)
Byte2FloatMapforEach in interface Byte2FloatMapforEach in class AbstractByte2FloatMapaction - processor of the values that are iterator overpublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Byte,java.lang.Float>keySet in interface Byte2FloatMapkeySet in interface Byte2FloatSortedMapkeySet in class AbstractByte2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Float>values in interface java.util.SortedMap<java.lang.Byte,java.lang.Float>values in interface Byte2FloatMapvalues in interface Byte2FloatSortedMapvalues in class AbstractByte2FloatMappublic ObjectSortedSet<Byte2FloatMap.Entry> byte2FloatEntrySet()
Byte2FloatMapbyte2FloatEntrySet in interface Byte2FloatMappublic 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 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 mergeAllFloat(Byte2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Byte2FloatMapmergeAllFloat in interface Byte2FloatMapmergeAllFloat in class AbstractByte2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic 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 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 ByteComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Byte,java.lang.Float>comparator in interface Byte2FloatSortedMappublic Byte2FloatSortedMap subMap(byte fromKey, byte toKey)
Byte2FloatSortedMapsubMap in interface Byte2FloatSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Byte2FloatSortedMap headMap(byte toKey)
Byte2FloatSortedMapheadMap in interface Byte2FloatSortedMaptoKey - where the headMap should endpublic Byte2FloatSortedMap tailMap(byte fromKey)
Byte2FloatSortedMaptailMap in interface Byte2FloatSortedMapfromKey - where the TailMap should start