public static class Long2FloatMaps.EmptyMap extends AbstractLong2FloatMap
AbstractLong2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2FloatMap.BuilderCache, Long2FloatMap.Entry, Long2FloatMap.FastEntrySet, Long2FloatMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(long key,
float value)
A Helper method to add a 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
|
Long2FloatMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(long key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2FloatMap.Entry> |
long2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
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
|
float |
putIfAbsent(long key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
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
|
float |
removeOrDefault(long key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
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() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceFloats, replaceFloats, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic float put(long key,
float value)
Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(long key,
float value)
Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(long key,
float value)
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 removedkey - that should be subtract fromvalue - that should be subtractpublic float remove(long key)
Long2FloatMapkey - the element that should be removedpublic float removeOrDefault(long key,
float defaultValue)
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)
Long2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(long key)
Long2FloatMapkey - the key that is searched forpublic 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 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 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()
Long2FloatMappublic Long2FloatMaps.EmptyMap copy()
Long2FloatMapcopy in interface Long2FloatMapcopy in class AbstractLong2FloatMap