public class ArrayMap<K,V> extends AbstractMap<K,V>
Modifier and Type | Class and Description |
---|---|
static class |
ArrayMap.Entry<K,V>
The Entry class represents a map entry
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ArrayMap()
Default constructor
|
ArrayMap(int initialCapacity)
Constructor with initialCapacity
|
ArrayMap(Map<K,V> other)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
ArrayMap<K,V> |
add(K key,
V value)
Builder method to build an ArrayMap
|
Set<Map.Entry<K,V>> |
entrySet() |
Map.Entry<K,V> |
getEntry(K key) |
int |
getIndex(K key) |
V |
put(K key,
V value) |
void |
put(K key,
V value,
int index) |
V |
remove(Object key) |
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public ArrayMap()
public ArrayMap(int initialCapacity)
public ArrayMap<K,V> add(K key, V value)
key
- the Keyvalue
- the Valuepublic int getIndex(K key)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.