Package org.apache.empire.commons
Class ArrayMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.apache.empire.commons.ArrayMap<K,V>
- All Implemented Interfaces:
Map<K,V>
This class is a lightweight Map implementation using an ArrayList
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Entry class represents a map entryNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ArrayMap
public ArrayMap()Default constructor -
ArrayMap
public ArrayMap(int initialCapacity) Constructor with initialCapacity- Parameters:
initialCapacity- the initial capacity
-
ArrayMap
Copy Constructor- Parameters:
other- the map from which to copy
-
-
Method Details
-
add
Builder method to build an ArrayMap- Parameters:
key- the Keyvalue- the Value- Returns:
- the ArrayMap
-
entrySet
-
remove
-
put
-
put
-
getIndex
-
getEntry
-