Class ConcurrentLongFloatMap
java.lang.Object
com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
com.trivago.fastutilconcurrentwrapper.map.ConcurrentLongFloatMap
- All Implemented Interfaces:
LongFloatMap,PrimitiveKeyMap,PrimitiveLongKeyMap
-
Field Summary
Fields inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
locks, numBucketsFields inherited from interface com.trivago.fastutilconcurrentwrapper.LongFloatMap
DEFAULT_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentLongFloatMap(int numBuckets, int initialCapacity, float loadFactor, float defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionfloatcomputeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2FloatFunction mappingFunction) floatcomputeIfPresent(int key, BiFunction<Long, Float, Float> mappingFunction) booleancontainsKey(long key) floatget(long l) floatbooleanisEmpty()floatput(long key, float value) floatremove(long key) booleanremove(long key, float value) Remove this key only if it has the given value.intsize()Methods inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
getBucket, getBucket, isEmpty, size
-
Constructor Details
-
ConcurrentLongFloatMap
public ConcurrentLongFloatMap(int numBuckets, int initialCapacity, float loadFactor, float defaultValue)
-
-
Method Details
-
getDefaultValue
public float getDefaultValue()- Specified by:
getDefaultValuein interfaceLongFloatMap
-
size
public int size()- Specified by:
sizein interfacePrimitiveKeyMap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveKeyMap
-
containsKey
public boolean containsKey(long key) - Specified by:
containsKeyin interfacePrimitiveLongKeyMap
-
get
public float get(long l) - Specified by:
getin interfaceLongFloatMap- Parameters:
l- key- Returns:
- 0.0 if the key is not present
-
put
public float put(long key, float value) - Specified by:
putin interfaceLongFloatMap
-
remove
public float remove(long key) - Specified by:
removein interfaceLongFloatMap
-
remove
public boolean remove(long key, float value) Description copied from interface:LongFloatMapRemove this key only if it has the given value.- Specified by:
removein interfaceLongFloatMap- Returns:
-
computeIfAbsent
public float computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2FloatFunction mappingFunction) - Specified by:
computeIfAbsentin interfaceLongFloatMap
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceLongFloatMap
-