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:
java.util.Map<K,V>
- Direct Known Subclasses:
HopscotchHashMap
public abstract class ArrayMap<K,V> extends java.util.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(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
abstract V
get(java.lang.Object key)
java.util.Set<K>
keySet()
abstract V
put(K key, V value)
abstract V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
-
-
-
-
Method Detail
-
get
public abstract V get(java.lang.Object key)
-
remove
public abstract V remove(java.lang.Object key)
-
size
public int size()
-
containsValue
public boolean containsValue(java.lang.Object value)
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
-