Interface NullableLongLongMap

All Known Implementing Classes:
HashMapBase, HashMapK1V1, HashMapK2V2, HashMapK4V4, HashMapLockFreeK1V1, HashMapLockFreeK2V2, HashMapLockFreeK4V4

public interface NullableLongLongMap
The interface we use for our Long2LongMaps that are the basis for a hashed redirection index.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
     
    long
     
    void
    forEach(it.unimi.dsi.fastutil.longs.LongLongBiConsumer consumer)
     
    long
    get(long key)
    Gets the value associated with key.
    boolean
     
    long
    put(long key, long value)
    Add a mapping from key to value.
    long
    putIfAbsent(long key, long value)
    Add a mapping from key to value, if one does not already exist.
    long
    remove(long key)
    Remove a mapping for a key.
    void
     
    int
     
  • Method Details

    • resetToNull

      void resetToNull()
    • capacity

      int capacity()
    • size

      int size()
      Returns:
      the size of this map
    • isEmpty

      boolean isEmpty()
      Returns:
      true if this map is empty (i.e. size is zero)
    • defaultReturnValue

      long defaultReturnValue()
      Returns:
      the value returned from get(long) when no value is present in the map.
    • put

      long put(long key, long value)
      Add a mapping from key to value. Return the old value of key.
      Parameters:
      key - the key to add
      value - the value to add
      Returns:
      the old value of key (or defaultReturnValue()} if there was no mapping)
    • putIfAbsent

      long putIfAbsent(long key, long value)
      Add a mapping from key to value, if one does not already exist. Return the old value of key (or defaultReturnValue()) if one does not exist.
      Parameters:
      key - the key to add
      value - the value to add
      Returns:
      the old value of key (or defaultReturnValue()} if there was no mapping)
    • get

      long get(long key)
      Gets the value associated with key. Returns defaultReturnValue()} if no mapping exists.
      Parameters:
      key - the key to get
      Returns:
      the value of the key (or defaultReturnValue())
    • remove

      long remove(long key)
      Remove a mapping for a key. Return the removed value of key (or defaultReturnValue()) if one does not exist.
      Parameters:
      key - the key to add
      Returns:
      the removed value of (or defaultReturnValue()} if there was no mapping)
    • clear

      void clear()
    • forEach

      void forEach(it.unimi.dsi.fastutil.longs.LongLongBiConsumer consumer)