public abstract class AbstractLong2FloatMap extends java.util.AbstractMap<java.lang.Long,java.lang.Float> implements Long2FloatMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLong2FloatMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2FloatMap.BuilderCache, Long2FloatMap.Entry, Long2FloatMap.FastEntrySet, Long2FloatMap.MapBuilder| Constructor and Description |
|---|
AbstractLong2FloatMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Long2FloatMap m)
A Helper method to bulk add primitives together.
|
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
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
Long2FloatMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Float>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(LongFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Float |
get(java.lang.Object key) |
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) |
int |
hashCode() |
LongSet |
keySet() |
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
|
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(java.lang.Long[] keys,
java.lang.Float[] values,
int offset,
int size)
Type Specific Object 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.
|
java.lang.Float |
remove(java.lang.Object key) |
float |
replace(long key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
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
|
float |
supplyFloatIfAbsent(long key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
FloatCollection |
values() |
clear, containsKey, containsValue, isEmpty, size, toStringaddTo, applyAsFloat, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, long2FloatEntrySet, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic float getDefaultReturnValue()
Long2FloatMapgetDefaultReturnValue in interface Long2FloatMappublic AbstractLong2FloatMap setDefaultReturnValue(float v)
Long2FloatMapsetDefaultReturnValue in interface Long2FloatMapv - value that should be the default return valuepublic Long2FloatMap copy()
Long2FloatMapcopy in interface Long2FloatMap@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 java.util.AbstractMap<java.lang.Long,java.lang.Float>public void addToAll(Long2FloatMap m)
Long2FloatMapaddToAll in interface Long2FloatMapm - the values that should be added/insertedpublic void putAll(Long2FloatMap m)
Long2FloatMapputAll in interface Long2FloatMapm - 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 java.util.AbstractMap<java.lang.Long,java.lang.Float>public void putAll(long[] keys,
float[] values,
int offset,
int size)
Long2FloatMapputAll in interface Long2FloatMapkeys - 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 void putAll(java.lang.Long[] keys,
java.lang.Float[] values,
int offset,
int size)
Long2FloatMapputAll in interface Long2FloatMapkeys - 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 void putAllIfAbsent(Long2FloatMap m)
Long2FloatMapputAllIfAbsent in interface Long2FloatMapm - elements that should be added if not present.public boolean containsKey(long key)
Long2FloatMapcontainsKey in interface Long2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Long2FloatMapcontainsValue in interface Long2FloatMapvalue - element that is searched forpublic boolean replace(long key,
float oldValue,
float newValue)
Long2FloatMapreplace in interface Long2FloatMapkey - 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 Long2FloatMapkey - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Long2FloatMap m)
Long2FloatMapreplaceFloats in interface Long2FloatMapm - elements that should be replaced.public void replaceFloats(LongFloatUnaryOperator mappingFunction)
Long2FloatMapreplaceFloats in interface Long2FloatMapmappingFunction - operation to replace all valuespublic float computeFloat(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloat in interface Long2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(long key,
Long2FloatFunction mappingFunction)
Long2FloatMapcomputeFloatIfAbsent in interface Long2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(long key,
FloatSupplier valueProvider)
Long2FloatMapsupplyFloatIfAbsent in interface Long2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloatIfPresent in interface Long2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(long key,
float value,
FloatFloatUnaryOperator mappingFunction)
Long2FloatMapmergeFloat in interface Long2FloatMapkey - 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 Long2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic 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 java.util.AbstractMap<java.lang.Long,java.lang.Float>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 Long2FloatMappublic float getOrDefault(long key,
float defaultValue)
Long2FloatMapgetOrDefault in interface Long2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic 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 java.util.AbstractMap<java.lang.Long,java.lang.Float>key - the element that should be removedMap.remove(Object)public void forEach(LongFloatConsumer action)
Long2FloatMapforEach in interface Long2FloatMapaction - processor of the values that are iterator overpublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Float>keySet in interface Long2FloatMapkeySet in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public FloatCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Float>values in interface Long2FloatMapvalues in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Float>> entrySet()
entrySet in interface java.util.Map<java.lang.Long,java.lang.Float>entrySet in interface Long2FloatMapentrySet in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Long,java.lang.Float>equals in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public int hashCode()
hashCode in interface java.util.Map<java.lang.Long,java.lang.Float>hashCode in class java.util.AbstractMap<java.lang.Long,java.lang.Float>