Package com.linkedin.alpini.base.misc
Class ArrayMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.linkedin.alpini.base.misc.ArrayMap<K,V>
- Type Parameters:
K
- Key typeV
- Value type
- All Implemented Interfaces:
Map<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.-
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
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
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
-
_entries
-
-
Constructor Details
-
ArrayMap
public ArrayMap() -
ArrayMap
-
ArrayMap
public ArrayMap(int initialSize) -
ArrayMap
-
ArrayMap
-
-
Method Details