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
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)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
size
protected int size -
keys
-
values
-
modCount
protected int modCount
-
-
Constructor Details
-
ArrayMap
public ArrayMap()
-
-
Method Details
-
get
-
put
-
remove
-
size
public int size() -
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V> - Overrides:
containsValue
in classAbstractMap<K,
V>
-
keySet
-
values
-
entrySet
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
V>
-
clear
public void clear()
-