Class ConcurrentBusyWaitingLongIntMap

java.lang.Object
com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
com.trivago.fastutilconcurrentwrapper.map.ConcurrentBusyWaitingLongIntMap
All Implemented Interfaces:
LongIntMap, PrimitiveKeyMap, PrimitiveLongKeyMap

public class ConcurrentBusyWaitingLongIntMap extends PrimitiveConcurrentMap implements LongIntMap
  • Constructor Details

    • ConcurrentBusyWaitingLongIntMap

      public ConcurrentBusyWaitingLongIntMap(int numBuckets, int initialCapacity, float loadFactor, int defaultValue)
  • Method Details

    • size

      public int size()
      Specified by:
      size in interface PrimitiveKeyMap
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface PrimitiveKeyMap
    • containsKey

      public boolean containsKey(long key)
      Specified by:
      containsKey in interface PrimitiveLongKeyMap
    • get

      public int get(long key)
      Specified by:
      get in interface LongIntMap
      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:
      put in interface LongIntMap
    • getDefaultValue

      public int getDefaultValue()
      Specified by:
      getDefaultValue in interface LongIntMap
    • remove

      public int remove(long key)
      Specified by:
      remove in interface LongIntMap
    • remove

      public boolean remove(long key, int value)
      Specified by:
      remove in interface LongIntMap
    • computeIfAbsent

      public int computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2IntFunction mappingFunction)
      Specified by:
      computeIfAbsent in interface LongIntMap
    • computeIfPresent

      public int computeIfPresent(long key, BiFunction<Long,Integer,Integer> mappingFunction)
      Specified by:
      computeIfPresent in interface LongIntMap