Class PrimitiveFastutilLongIntWrapper
java.lang.Object
com.trivago.fastutilconcurrentwrapper.wrapper.PrimitiveFastutilLongIntWrapper
- All Implemented Interfaces:
LongIntMap,PrimitiveKeyMap,PrimitiveLongKeyMap
-
Field Summary
Fields inherited from interface com.trivago.fastutilconcurrentwrapper.LongIntMap
DEFAULT_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveFastutilLongIntWrapper(int initialCapacity, float loadFactor) PrimitiveFastutilLongIntWrapper(int initialCapacity, float loadFactor, int defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionintcomputeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2IntFunction mappingFunction) intcomputeIfPresent(long key, BiFunction<Long, Integer, Integer> mappingFunction) booleancontainsKey(long key) intget(long key) intbooleanisEmpty()intput(long key, int value) intremove(long key) booleanremove(long key, int value) intsize()
-
Constructor Details
-
PrimitiveFastutilLongIntWrapper
public PrimitiveFastutilLongIntWrapper(int initialCapacity, float loadFactor) -
PrimitiveFastutilLongIntWrapper
public PrimitiveFastutilLongIntWrapper(int initialCapacity, float loadFactor, int defaultValue)
-
-
Method Details
-
get
public int get(long key) - Specified by:
getin interfaceLongIntMap- Parameters:
key- key to get- Returns:
- configured LongIntMap.getDefaultValue(), if the key is not present
-
put
public int put(long key, int value) - Specified by:
putin interfaceLongIntMap
-
getDefaultValue
public int getDefaultValue()- Specified by:
getDefaultValuein interfaceLongIntMap
-
remove
public int remove(long key) - Specified by:
removein interfaceLongIntMap
-
remove
public boolean remove(long key, int value) - Specified by:
removein interfaceLongIntMap
-
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 int computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2IntFunction mappingFunction) - Specified by:
computeIfAbsentin interfaceLongIntMap
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceLongIntMap
-