public static class Int2FloatMaps.SynchronizedMap extends AbstractInt2FloatMap implements Int2FloatMap
AbstractInt2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2FloatMap.BuilderCache, Int2FloatMap.Entry, Int2FloatMap.FastEntrySet, Int2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(int key,
float value)
A Helper method to add a primitives together.
|
void |
addToAll(Int2FloatMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Float |
compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
float |
computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Float |
computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Float> mappingFunction)
Deprecated.
|
java.lang.Float |
computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Int2FloatMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Float> action)
Deprecated.
|
void |
forEach(IntFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Float |
get(java.lang.Object key)
Deprecated.
|
float |
getDefaultReturnValue()
Method to see what the default return value is.
|
float |
getOrDefault(int key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Float |
getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
Deprecated.
|
ObjectSet<Int2FloatMap.Entry> |
int2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
java.lang.Float |
merge(java.lang.Integer key,
java.lang.Float value,
java.util.function.BiFunction<? super java.lang.Float,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
void |
mergeAllFloat(Int2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Float |
put(java.lang.Integer key,
java.lang.Float value)
Deprecated.
|
float |
put(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(int[] keys,
float[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Int2FloatMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> m) |
void |
putAllIfAbsent(Int2FloatMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Float |
putIfAbsent(java.lang.Integer key,
java.lang.Float value)
Deprecated.
|
float |
putIfAbsent(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Float |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
float |
removeOrDefault(int key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Float |
replace(java.lang.Integer key,
java.lang.Float value)
Deprecated.
|
boolean |
replace(java.lang.Integer key,
java.lang.Float oldValue,
java.lang.Float newValue)
Deprecated.
|
float |
replace(int key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
void |
replaceFloats(Int2FloatMap m)
Type-Specific bulk replace method.
|
void |
replaceFloats(IntFloatUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractInt2FloatMap |
setDefaultReturnValue(float v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
float |
subFrom(int key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
FloatCollection |
values() |
entrySet, equals, hashCode, putAllapplyAsFloat, builder, entrySet, put, put, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic float getDefaultReturnValue()
Int2FloatMapgetDefaultReturnValue in interface Int2FloatMapgetDefaultReturnValue in class AbstractInt2FloatMappublic AbstractInt2FloatMap setDefaultReturnValue(float v)
Int2FloatMapsetDefaultReturnValue in interface Int2FloatMapsetDefaultReturnValue in class AbstractInt2FloatMapv - value that should be the default return valuepublic float put(int key,
float value)
Int2FloatMapput in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(int key,
float value)
Int2FloatMapputIfAbsent in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Int2FloatMap m)
Int2FloatMapputAllIfAbsent in interface Int2FloatMapputAllIfAbsent in class AbstractInt2FloatMapm - elements that should be added if not present.public float addTo(int key,
float value)
Int2FloatMapaddTo in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(int key,
float value)
Int2FloatMapInt2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Int2FloatMap m)
Int2FloatMapaddToAll in interface Int2FloatMapaddToAll in class AbstractInt2FloatMapm - the values that should be added/insertedpublic void putAll(Int2FloatMap m)
Int2FloatMapputAll in interface Int2FloatMapputAll in class AbstractInt2FloatMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> m)
putAll in interface java.util.Map<java.lang.Integer,java.lang.Float>putAll in class AbstractInt2FloatMappublic void putAll(int[] keys,
float[] values,
int offset,
int size)
Int2FloatMapputAll in interface Int2FloatMapputAll in class AbstractInt2FloatMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsKey(int key)
Int2FloatMapcontainsKey in interface Int2FloatMapcontainsKey in class AbstractInt2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Int2FloatMapcontainsValue in interface Int2FloatMapcontainsValue in class AbstractInt2FloatMapvalue - element that is searched forpublic float get(int key)
Int2FloatMapget in interface Int2FloatMapkey - the key that is searched forpublic float remove(int key)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedpublic float removeOrDefault(int key,
float defaultValue)
Int2FloatMapremoveOrDefault in interface Int2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
float value)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
float oldValue,
float newValue)
Int2FloatMapreplace in interface Int2FloatMapreplace in class AbstractInt2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(int key,
float value)
Int2FloatMapreplace in interface Int2FloatMapreplace in class AbstractInt2FloatMapkey - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Int2FloatMap m)
Int2FloatMapreplaceFloats in interface Int2FloatMapreplaceFloats in class AbstractInt2FloatMapm - elements that should be replaced.public void replaceFloats(IntFloatUnaryOperator mappingFunction)
Int2FloatMapreplaceFloats in interface Int2FloatMapreplaceFloats in class AbstractInt2FloatMapmappingFunction - operation to replace all valuespublic float computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloat in interface Int2FloatMapcomputeFloat in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
Int2FloatMapcomputeFloatIfAbsent in interface Int2FloatMapcomputeFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloatIfPresent in interface Int2FloatMapcomputeFloatIfPresent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
Int2FloatMapsupplyFloatIfAbsent in interface Int2FloatMapsupplyFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeFloat in interface Int2FloatMapmergeFloat in class AbstractInt2FloatMapkey - 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(Int2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeAllFloat in interface Int2FloatMapmergeAllFloat in class AbstractInt2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic float getOrDefault(int key,
float defaultValue)
Int2FloatMapgetOrDefault in interface Int2FloatMapgetOrDefault in class AbstractInt2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(IntFloatConsumer action)
Int2FloatMapforEach in interface Int2FloatMapforEach in class AbstractInt2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Float>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>public Int2FloatMap copy()
Int2FloatMapcopy in interface Int2FloatMapcopy in class AbstractInt2FloatMappublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Float>keySet in interface Int2FloatMapkeySet in class AbstractInt2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Float>values in interface Int2FloatMapvalues in class AbstractInt2FloatMappublic ObjectSet<Int2FloatMap.Entry> int2FloatEntrySet()
Int2FloatMapint2FloatEntrySet in interface Int2FloatMap@Deprecated public java.lang.Float get(java.lang.Object key)
get in interface java.util.Map<java.lang.Integer,java.lang.Float>get in interface Int2FloatMapget in class AbstractInt2FloatMap@Deprecated
public java.lang.Float getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
getOrDefault in interface java.util.Map<java.lang.Integer,java.lang.Float>getOrDefault in interface Int2FloatMapgetOrDefault in class AbstractInt2FloatMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Integer,java.lang.Float>containsValue in interface Int2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Integer,java.lang.Float>containsKey in interface Int2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Float put(java.lang.Integer key,
java.lang.Float value)
put in interface java.util.Map<java.lang.Integer,java.lang.Float>put in interface Int2FloatMapput in class AbstractInt2FloatMap@Deprecated public java.lang.Float remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,java.lang.Float>remove in interface Int2FloatMapremove in class AbstractInt2FloatMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>@Deprecated
public java.lang.Float putIfAbsent(java.lang.Integer key,
java.lang.Float value)
putIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Float>putIfAbsent in interface Int2FloatMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Integer,java.lang.Float>remove in interface Int2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Integer key,
java.lang.Float oldValue,
java.lang.Float newValue)
replace in interface java.util.Map<java.lang.Integer,java.lang.Float>replace in interface Int2FloatMap@Deprecated
public java.lang.Float replace(java.lang.Integer key,
java.lang.Float value)
replace in interface java.util.Map<java.lang.Integer,java.lang.Float>replace in interface Int2FloatMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Integer,java.lang.Float>replaceAll in interface Int2FloatMap@Deprecated
public java.lang.Float compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
compute in interface java.util.Map<java.lang.Integer,java.lang.Float>compute in interface Int2FloatMap@Deprecated
public java.lang.Float computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Float> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Float>computeIfAbsent in interface Int2FloatMap@Deprecated
public java.lang.Float computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Integer,java.lang.Float>computeIfPresent in interface Int2FloatMap@Deprecated
public java.lang.Float merge(java.lang.Integer key,
java.lang.Float value,
java.util.function.BiFunction<? super java.lang.Float,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
merge in interface java.util.Map<java.lang.Integer,java.lang.Float>merge in interface Int2FloatMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Float> action)
forEach in interface java.util.Map<java.lang.Integer,java.lang.Float>forEach in interface Int2FloatMap