K - The type of the keysV - The type of the valuespublic class ArrayMap<K,V> extends Object implements Map<K,V>
ArrayMap is a Map implementation that is backed by arrays.
It does not rely on object hashes but solely uses
Object.equals(Object) to compare objects.| Constructor and Description |
|---|
ArrayMap()
Creates a new array map with a default size of 10.
|
ArrayMap(int initialSize)
Creates a new array map with the given default size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic ArrayMap()
public ArrayMap(int initialSize)
initialSize - The initial size of the array mapCopyright © 2026. All rights reserved.