Class HashMapLockFreeK1V1
java.lang.Object
io.deephaven.util.datastructures.hash.HashMapBase
io.deephaven.util.datastructures.hash.HashMapK1V1
io.deephaven.util.datastructures.hash.HashMapLockFreeK1V1
- All Implemented Interfaces:
NullableLongLongMap
-
Constructor Summary
ConstructorsConstructorDescriptionHashMapLockFreeK1V1(int desiredInitialCapacity) HashMapLockFreeK1V1(int desiredInitialCapacity, float loadFactor, long noEntryValue) -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()voidclear()voidforEach(it.unimi.dsi.fastutil.longs.LongLongBiConsumer consumer) longget(long key) Gets the value associated with key.long[]keyArray()long[]keyArray(long[] space) longput(long key, long value) Add a mapping from key to value.longputIfAbsent(long key, long value) Add a mapping from key to value, if one does not already exist.longremove(long key) Remove a mapping for a key.voidprotected voidsetKeysAndValues(long[] keysAndValues) long[]long[]valueArray(long[] space) Methods inherited from class io.deephaven.util.datastructures.hash.HashMapK1V1
putImplNoTranslateMethods inherited from class io.deephaven.util.datastructures.hash.HashMapBase
defaultReturnValue, isEmpty, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.util.datastructures.hash.NullableLongLongMap
defaultReturnValue, isEmpty, size
-
Constructor Details
-
HashMapLockFreeK1V1
public HashMapLockFreeK1V1() -
HashMapLockFreeK1V1
public HashMapLockFreeK1V1(int desiredInitialCapacity) -
HashMapLockFreeK1V1
public HashMapLockFreeK1V1(int desiredInitialCapacity, float loadFactor, long noEntryValue)
-
-
Method Details
-
setKeysAndValues
protected void setKeysAndValues(long[] keysAndValues) - Specified by:
setKeysAndValuesin classHashMapBase
-
put
public long put(long key, long value) Description copied from interface:NullableLongLongMapAdd a mapping from key to value. Return the old value of key.- Specified by:
putin interfaceNullableLongLongMap- Parameters:
key- the key to addvalue- the value to add- Returns:
- the old value of key (or
NullableLongLongMap.defaultReturnValue()} if there was no mapping)
-
putIfAbsent
public long putIfAbsent(long key, long value) Description copied from interface:NullableLongLongMapAdd a mapping from key to value, if one does not already exist. Return the old value of key (orNullableLongLongMap.defaultReturnValue()) if one does not exist.- Specified by:
putIfAbsentin interfaceNullableLongLongMap- Parameters:
key- the key to addvalue- the value to add- Returns:
- the old value of key (or
NullableLongLongMap.defaultReturnValue()} if there was no mapping)
-
get
public long get(long key) Description copied from interface:NullableLongLongMapGets the value associated with key. ReturnsNullableLongLongMap.defaultReturnValue()} if no mapping exists.- Specified by:
getin interfaceNullableLongLongMap- Parameters:
key- the key to get- Returns:
- the value of the key (or
NullableLongLongMap.defaultReturnValue())
-
remove
public long remove(long key) Description copied from interface:NullableLongLongMapRemove a mapping for a key. Return the removed value of key (orNullableLongLongMap.defaultReturnValue()) if one does not exist.- Specified by:
removein interfaceNullableLongLongMap- Parameters:
key- the key to add- Returns:
- the removed value of (or
NullableLongLongMap.defaultReturnValue()} if there was no mapping)
-
capacity
public int capacity()- Specified by:
capacityin interfaceNullableLongLongMap
-
clear
public void clear()- Specified by:
clearin interfaceNullableLongLongMap
-
resetToNull
public void resetToNull()- Specified by:
resetToNullin interfaceNullableLongLongMap
-
keyArray
public long[] keyArray() -
keyArray
public long[] keyArray(long[] space) -
valueArray
public long[] valueArray() -
valueArray
public long[] valueArray(long[] space) -
forEach
public void forEach(it.unimi.dsi.fastutil.longs.LongLongBiConsumer consumer) - Specified by:
forEachin interfaceNullableLongLongMap
-