Class ArrayMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
com.linkedin.alpini.base.misc.ArrayMap<K,V>
Type Parameters:
K - Key type
V - Value type
All Implemented Interfaces:
Map<K,V>

@NotThreadSafe public class ArrayMap<K,V> extends AbstractMap<K,V>
Simple ArrayList backed Map implementation which uses simple linear scans of the list for searching for matching keys. Ideal for very small maps where the cost of hash computation may be considered excessive and Object.equals(Object) of the key is cheap. Permits null as a key value.
  • Field Details

  • Constructor Details

    • ArrayMap

      public ArrayMap()
    • ArrayMap

      public ArrayMap(BiPredicate<K,K> keyEquals)
    • ArrayMap

      public ArrayMap(int initialSize)
    • ArrayMap

      public ArrayMap(int initialSize, BiPredicate<K,K> keyEquals)
    • ArrayMap

      public ArrayMap(Map<K,V> source)
  • Method Details