public static class Long2FloatMaps.SynchronizedMap extends AbstractLong2FloatMap implements Long2FloatMap
AbstractLong2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2FloatMap.BuilderCache, Long2FloatMap.Entry, Long2FloatMap.FastEntrySet, Long2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(long key,
float value)
A Helper method to add a primitives together.
|
void |
addToAll(Long2FloatMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Float |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
float |
computeFloat(long key,
LongFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(long key,
Long2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(long key,
LongFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Float |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Float> mappingFunction)
Deprecated.
|
java.lang.Float |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
boolean |
containsKey(long 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.
|
Long2FloatMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Float> action)
Deprecated.
|
void |
forEach(LongFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(long 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(long 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.
|
LongSet |
keySet() |
ObjectSet<Long2FloatMap.Entry> |
long2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
java.lang.Float |
merge(java.lang.Long 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(Long2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(long key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(long key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Float |
put(java.lang.Long key,
java.lang.Float value)
Deprecated.
|
void |
putAll(long[] 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(Long2FloatMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> m) |
void |
putAllIfAbsent(Long2FloatMap m)
Type-Specific bulk put method put elements into the map if not present.
|
float |
putIfAbsent(long key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Float |
putIfAbsent(java.lang.Long key,
java.lang.Float value)
Deprecated.
|
float |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long 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(long key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(long key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Float |
replace(java.lang.Long key,
java.lang.Float value)
Deprecated.
|
boolean |
replace(long key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
java.lang.Float oldValue,
java.lang.Float newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
void |
replaceFloats(Long2FloatMap m)
Type-Specific bulk replace method.
|
void |
replaceFloats(LongFloatUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2FloatMap |
setDefaultReturnValue(float v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
float |
subFrom(long key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(long 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()
Long2FloatMapgetDefaultReturnValue in interface Long2FloatMapgetDefaultReturnValue in class AbstractLong2FloatMappublic AbstractLong2FloatMap setDefaultReturnValue(float v)
Long2FloatMapsetDefaultReturnValue in interface Long2FloatMapsetDefaultReturnValue in class AbstractLong2FloatMapv - value that should be the default return valuepublic float put(long key,
float value)
Long2FloatMapput in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(long key,
float value)
Long2FloatMapputIfAbsent in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2FloatMap m)
Long2FloatMapputAllIfAbsent in interface Long2FloatMapputAllIfAbsent in class AbstractLong2FloatMapm - elements that should be added if not present.public float addTo(long key,
float value)
Long2FloatMapaddTo in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(long key,
float value)
Long2FloatMapLong2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Long2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Long2FloatMap m)
Long2FloatMapaddToAll in interface Long2FloatMapaddToAll in class AbstractLong2FloatMapm - the values that should be added/insertedpublic void putAll(Long2FloatMap m)
Long2FloatMapputAll in interface Long2FloatMapputAll in class AbstractLong2FloatMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Float>putAll in class AbstractLong2FloatMappublic void putAll(long[] keys,
float[] values,
int offset,
int size)
Long2FloatMapputAll in interface Long2FloatMapputAll in class AbstractLong2FloatMapkeys - 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(long key)
Long2FloatMapcontainsKey in interface Long2FloatMapcontainsKey in class AbstractLong2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Long2FloatMapcontainsValue in interface Long2FloatMapcontainsValue in class AbstractLong2FloatMapvalue - element that is searched forpublic float get(long key)
Long2FloatMapget in interface Long2FloatMapkey - the key that is searched forpublic float remove(long key)
Long2FloatMapremove in interface Long2FloatMapkey - the element that should be removedpublic float removeOrDefault(long key,
float defaultValue)
Long2FloatMapremoveOrDefault in interface Long2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
float value)
Long2FloatMapremove in interface Long2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
float oldValue,
float newValue)
Long2FloatMapreplace in interface Long2FloatMapreplace in class AbstractLong2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(long key,
float value)
Long2FloatMapreplace in interface Long2FloatMapreplace in class AbstractLong2FloatMapkey - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Long2FloatMap m)
Long2FloatMapreplaceFloats in interface Long2FloatMapreplaceFloats in class AbstractLong2FloatMapm - elements that should be replaced.public void replaceFloats(LongFloatUnaryOperator mappingFunction)
Long2FloatMapreplaceFloats in interface Long2FloatMapreplaceFloats in class AbstractLong2FloatMapmappingFunction - operation to replace all valuespublic float computeFloat(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloat in interface Long2FloatMapcomputeFloat in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(long key,
Long2FloatFunction mappingFunction)
Long2FloatMapcomputeFloatIfAbsent in interface Long2FloatMapcomputeFloatIfAbsent in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloatIfPresent in interface Long2FloatMapcomputeFloatIfPresent in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(long key,
FloatSupplier valueProvider)
Long2FloatMapsupplyFloatIfAbsent in interface Long2FloatMapsupplyFloatIfAbsent in class AbstractLong2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(long key,
float value,
FloatFloatUnaryOperator mappingFunction)
Long2FloatMapmergeFloat in interface Long2FloatMapmergeFloat in class AbstractLong2FloatMapkey - 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(Long2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Long2FloatMapmergeAllFloat in interface Long2FloatMapmergeAllFloat in class AbstractLong2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic float getOrDefault(long key,
float defaultValue)
Long2FloatMapgetOrDefault in interface Long2FloatMapgetOrDefault in class AbstractLong2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongFloatConsumer action)
Long2FloatMapforEach in interface Long2FloatMapforEach in class AbstractLong2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Float>size in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public Long2FloatMap copy()
Long2FloatMapcopy in interface Long2FloatMapcopy in class AbstractLong2FloatMappublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Float>keySet in interface Long2FloatMapkeySet in class AbstractLong2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Float>values in interface Long2FloatMapvalues in class AbstractLong2FloatMappublic ObjectSet<Long2FloatMap.Entry> long2FloatEntrySet()
Long2FloatMaplong2FloatEntrySet in interface Long2FloatMap@Deprecated public java.lang.Float get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Float>get in interface Long2FloatMapget in class AbstractLong2FloatMap@Deprecated
public java.lang.Float getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Float>getOrDefault in interface Long2FloatMapgetOrDefault in class AbstractLong2FloatMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Float>containsValue in interface Long2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Long,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.Long,java.lang.Float>containsKey in interface Long2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Float>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Float put(java.lang.Long key,
java.lang.Float value)
put in interface java.util.Map<java.lang.Long,java.lang.Float>put in interface Long2FloatMapput in class AbstractLong2FloatMap@Deprecated public java.lang.Float remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,java.lang.Float>remove in interface Long2FloatMapremove in class AbstractLong2FloatMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Float>@Deprecated
public java.lang.Float putIfAbsent(java.lang.Long key,
java.lang.Float value)
putIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Float>putIfAbsent in interface Long2FloatMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,java.lang.Float>remove in interface Long2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Long key,
java.lang.Float oldValue,
java.lang.Float newValue)
replace in interface java.util.Map<java.lang.Long,java.lang.Float>replace in interface Long2FloatMap@Deprecated
public java.lang.Float replace(java.lang.Long key,
java.lang.Float value)
replace in interface java.util.Map<java.lang.Long,java.lang.Float>replace in interface Long2FloatMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,java.lang.Float>replaceAll in interface Long2FloatMap@Deprecated
public java.lang.Float compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
compute in interface java.util.Map<java.lang.Long,java.lang.Float>compute in interface Long2FloatMap@Deprecated
public java.lang.Float computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Float> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Float>computeIfAbsent in interface Long2FloatMap@Deprecated
public java.lang.Float computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,java.lang.Float>computeIfPresent in interface Long2FloatMap@Deprecated
public java.lang.Float merge(java.lang.Long 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.Long,java.lang.Float>merge in interface Long2FloatMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Float> action)
forEach in interface java.util.Map<java.lang.Long,java.lang.Float>forEach in interface Long2FloatMap