Class ConcurrentLongIntMap
java.lang.Object
com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
com.trivago.fastutilconcurrentwrapper.map.ConcurrentLongIntMap
- All Implemented Interfaces:
LongIntMap,PrimitiveKeyMap,PrimitiveLongKeyMap
-
Field Summary
Fields inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
locks, numBucketsFields inherited from interface com.trivago.fastutilconcurrentwrapper.LongIntMap
DEFAULT_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentLongIntMap(int numBuckets, 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 l) intbooleanisEmpty()intput(long key, int value) intremove(long key) booleanremove(long key, int value) intsize()Methods inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
getBucket, getBucket, isEmpty, size
-
Constructor Details
-
ConcurrentLongIntMap
public ConcurrentLongIntMap(int numBuckets, int initialCapacity, float loadFactor, int defaultValue)
-
-
Method Details
-
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 int get(long l) - Specified by:
getin interfaceLongIntMap- Parameters:
l- 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
-
computeIfAbsent
public int computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2IntFunction mappingFunction) - Specified by:
computeIfAbsentin interfaceLongIntMap
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceLongIntMap
-