Class ArrayMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.infinispan.commons.util.ArrayMap<K,V>
All Implemented Interfaces:
Map<K,V>
Direct Known Subclasses:
HopscotchHashMap

public abstract class ArrayMap<K,V> extends AbstractMap<K,V>
Base for classes that implement hash map by storing keys in one array and values in another. It assumes that all keys that are in the array are contained in the map and that values are on corresponding indices in the map. Does not support null keys nor values. Forces implementation of methods get(Object), put(Object, Object), remove(Object)
  • Field Details

    • size

      protected int size
    • keys

      protected Object[] keys
    • values

      protected Object[] values
    • modCount

      protected int modCount
  • Constructor Details

    • ArrayMap

      public ArrayMap()
  • Method Details

    • get

      public abstract V get(Object key)
    • put

      public abstract V put(K key, V value)
    • remove

      public abstract V remove(Object key)
    • size

      public int size()
    • containsValue

      public boolean containsValue(Object value)
    • keySet

      public Set<K> keySet()
    • values

      public Collection<V> values()
    • entrySet

      public Set<Map.Entry<K,V>> entrySet()
    • containsKey

      public boolean containsKey(Object key)
    • clear

      public void clear()