Class PrimitiveFastutilLongFloatWrapper
java.lang.Object
com.trivago.fastutilconcurrentwrapper.wrapper.PrimitiveFastutilLongFloatWrapper
- All Implemented Interfaces:
LongFloatMap,PrimitiveKeyMap,PrimitiveLongKeyMap
-
Field Summary
Fields inherited from interface com.trivago.fastutilconcurrentwrapper.LongFloatMap
DEFAULT_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveFastutilLongFloatWrapper(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 key) 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()
-
Constructor Details
-
PrimitiveFastutilLongFloatWrapper
public PrimitiveFastutilLongFloatWrapper(int initialCapacity, float loadFactor, float defaultValue)
-
-
Method Details
-
getDefaultValue
public float getDefaultValue()- Specified by:
getDefaultValuein interfaceLongFloatMap
-
get
public float get(long key) - Specified by:
getin interfaceLongFloatMap- Parameters:
key- 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:
-
size
public int size()- Specified by:
sizein interfacePrimitiveKeyMap
-
containsKey
public boolean containsKey(long key) - Specified by:
containsKeyin interfacePrimitiveLongKeyMap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveKeyMap
-
computeIfAbsent
public float computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2FloatFunction mappingFunction) - Specified by:
computeIfAbsentin interfaceLongFloatMap
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceLongFloatMap
-