Class ConcurrentLongHashMap<V>

  • Type Parameters:
    V -

    public class ConcurrentLongHashMap<V>
    extends java.lang.Object
    Map from long to an Object. Provides similar methods as a ConcurrentMap<long,Object> with 2 differences:
    1. No boxing/unboxing from long -> Long
    2. Open hash map with linear probing, no node allocations to store the values
    • Constructor Detail

      • ConcurrentLongHashMap

        public ConcurrentLongHashMap()
      • ConcurrentLongHashMap

        public ConcurrentLongHashMap​(int expectedItems)
      • ConcurrentLongHashMap

        public ConcurrentLongHashMap​(int expectedItems,
                                     int numSections)
    • Method Detail

      • size

        public int size()
      • capacity

        public long capacity()
      • isEmpty

        public boolean isEmpty()
      • get

        public V get​(long key)
      • containsKey

        public boolean containsKey​(long key)
      • put

        public V put​(long key,
                     V value)
      • putIfAbsent

        public V putIfAbsent​(long key,
                             V value)
      • computeIfAbsent

        public V computeIfAbsent​(long key,
                                 java.util.function.LongFunction<V> provider)
      • remove

        public V remove​(long key)
      • remove

        public boolean remove​(long key,
                              java.lang.Object value)
      • clear

        public void clear()
      • keys

        public java.util.List<java.lang.Long> keys()
        Returns:
        a new list of all keys (makes a copy)
      • values

        public java.util.List<V> values()