public class Char2FloatArrayMap extends AbstractChar2FloatMap implements Char2FloatSortedMap
AbstractChar2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2FloatSortedMap.FastSortedSetChar2FloatMap.Entry, Char2FloatMap.FastEntrySet| Constructor and Description |
|---|
Char2FloatArrayMap()
Default Constructor
|
Char2FloatArrayMap(char[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2FloatArrayMap(char[] keys,
float[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Char2FloatArrayMap(Char2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2FloatArrayMap(java.lang.Character[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2FloatArrayMap(java.lang.Character[] 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
|
Char2FloatArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Char2FloatArrayMap(java.util.Map<? extends java.lang.Character,? 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(char key,
float value)
A Helper method to add a primitives together.
|
ObjectSortedSet<Char2FloatMap.Entry> |
char2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
CharComparator |
comparator() |
float |
computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(char 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) |
char |
firstCharKey()
A method to get the first Key of a Map.
|
float |
firstFloatValue()
A method to get the first Value of a Map.
|
void |
forEach(CharFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
getAndMoveToFirst(char key)
A Specific get method that allows to move teh given key/value int the first index.
|
float |
getAndMoveToLast(char key)
A Specific get method that allows to move teh given key/value int the last index.
|
float |
getFloat(char key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(char key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Char2FloatSortedMap |
headMap(char toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
CharSet |
keySet() |
char |
lastCharKey()
A method to get the last Key of a Map.
|
float |
lastFloatValue()
A method to get the last Value of a Map.
|
void |
mergeAllFloat(Char2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(char key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(char key)
A specific move method to move a given key/value to the last index.
|
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
float |
put(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putAndMoveToFirst(char key,
float value)
A customized put method that allows you to insert into the first index.
|
float |
putAndMoveToLast(char key,
float value)
A customized put method that allows you to insert into the last index.
|
float |
putIfAbsent(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remChar(char key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remCharOrDefault(char key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(char 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(char key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Char2FloatSortedMap |
subMap(char fromKey,
char toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Char2FloatSortedMap |
tailMap(char 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 Char2FloatArrayMap()
public Char2FloatArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Char2FloatArrayMap(java.lang.Character[] 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 Char2FloatArrayMap(java.lang.Character[] 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 Char2FloatArrayMap(char[] 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 Char2FloatArrayMap(char[] 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 Char2FloatArrayMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Char2FloatArrayMap(Char2FloatMap map)
map - the values that should be present in the mappublic float put(char key,
float value)
Char2FloatMapput in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(char key,
float value)
Char2FloatMapputIfAbsent in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(char key,
float value)
Char2FloatMapaddTo in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float putAndMoveToFirst(char key,
float value)
Char2FloatSortedMapputAndMoveToFirst in interface Char2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(char key,
float value)
Char2FloatSortedMapputAndMoveToLast in interface Char2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(char key)
Char2FloatSortedMapmoveToFirst in interface Char2FloatSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(char key)
Char2FloatSortedMapmoveToLast in interface Char2FloatSortedMapkey - that should be moved to the first lastpublic boolean containsKey(char key)
Char2FloatMapcontainsKey in interface Char2FloatMapcontainsKey in class AbstractChar2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Char2FloatMapcontainsValue in interface Char2FloatMapcontainsValue in class AbstractChar2FloatMapvalue - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,java.lang.Float>containsKey in interface Char2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Character,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.Character,java.lang.Float>containsValue in interface Char2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Character,java.lang.Float>value - that is searched for.Map.containsValue(Object)public float getFloat(char key)
Char2FloatMapgetFloat in interface Char2FloatFunctiongetFloat in interface Char2FloatMapkey - the key that is searched forpublic float getOrDefault(char key,
float defaultValue)
Char2FloatMapgetOrDefault in interface Char2FloatMapgetOrDefault in class AbstractChar2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float getAndMoveToFirst(char key)
Char2FloatSortedMapgetAndMoveToFirst in interface Char2FloatSortedMapkey - that is searched forpublic float getAndMoveToLast(char key)
Char2FloatSortedMapgetAndMoveToLast in interface Char2FloatSortedMapkey - that is searched forpublic char firstCharKey()
Char2FloatSortedMapfirstCharKey in interface Char2FloatSortedMappublic char lastCharKey()
Char2FloatSortedMaplastCharKey in interface Char2FloatSortedMappublic float firstFloatValue()
Char2FloatSortedMapfirstFloatValue in interface Char2FloatSortedMappublic float lastFloatValue()
Char2FloatSortedMaplastFloatValue in interface Char2FloatSortedMappublic char pollFirstCharKey()
Char2FloatSortedMappollFirstCharKey in interface Char2FloatSortedMappublic char pollLastCharKey()
Char2FloatSortedMappollLastCharKey in interface Char2FloatSortedMappublic float remChar(char key)
Char2FloatMapremChar in interface Char2FloatMapkey - the element that should be removedpublic float remCharOrDefault(char key,
float defaultValue)
Char2FloatMapremCharOrDefault in interface Char2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(char key,
float value)
Char2FloatMapremove in interface Char2FloatMapkey - 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.Character,java.lang.Float>remove in interface Char2FloatMapremove in class java.util.AbstractMap<java.lang.Character,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.Character,java.lang.Float>remove in interface Char2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(CharFloatConsumer action)
Char2FloatMapforEach in interface Char2FloatMapforEach in class AbstractChar2FloatMapaction - processor of the values that are iterator overpublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Character,java.lang.Float>keySet in interface Char2FloatMapkeySet in interface Char2FloatSortedMapkeySet in class AbstractChar2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Float>values in interface java.util.SortedMap<java.lang.Character,java.lang.Float>values in interface Char2FloatMapvalues in interface Char2FloatSortedMapvalues in class AbstractChar2FloatMappublic ObjectSortedSet<Char2FloatMap.Entry> char2FloatEntrySet()
Char2FloatMapchar2FloatEntrySet in interface Char2FloatMappublic boolean replace(char key,
float oldValue,
float newValue)
Char2FloatMapreplace in interface Char2FloatMapreplace in class AbstractChar2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(char key,
float value)
Char2FloatMapreplace in interface Char2FloatMapreplace in class AbstractChar2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloat in interface Char2FloatMapcomputeFloat in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
Char2FloatMapcomputeFloatIfAbsent in interface Char2FloatMapcomputeFloatIfAbsent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloatIfPresent in interface Char2FloatMapcomputeFloatIfPresent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeFloat in interface Char2FloatMapmergeFloat in class AbstractChar2FloatMapkey - 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(Char2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeAllFloat in interface Char2FloatMapmergeAllFloat in class AbstractChar2FloatMapm - 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.Character,java.lang.Float>size in class java.util.AbstractMap<java.lang.Character,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Character,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Character,java.lang.Float>public CharComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Character,java.lang.Float>comparator in interface Char2FloatSortedMappublic Char2FloatSortedMap subMap(char fromKey, char toKey)
Char2FloatSortedMapsubMap in interface Char2FloatSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Char2FloatSortedMap headMap(char toKey)
Char2FloatSortedMapheadMap in interface Char2FloatSortedMaptoKey - where the headMap should endpublic Char2FloatSortedMap tailMap(char fromKey)
Char2FloatSortedMaptailMap in interface Char2FloatSortedMapfromKey - where the TailMap should start