Package org.infinispan.commons.util
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 methodsget(Object)
,put(Object, Object)
,remove(Object)
-
-
Constructor Summary
Constructors Constructor Description ArrayMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
abstract V
get(Object key)
Set<K>
keySet()
abstract V
put(K key, V value)
abstract V
remove(Object key)
int
size()
Collection<V>
values()
-
-
-
Method Detail
-
size
public int size()
-
containsValue
public boolean containsValue(Object value)
-
values
public Collection<V> values()
-
containsKey
public boolean containsKey(Object key)
-
clear
public void clear()
-
-