K
- The type of keys maintained by this ArrayMapV
- The type of mapped valuespublic class ArrayMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>
ArrayList
Constructor and Description |
---|
ArrayMap()
Constructs an empty ArrayMap with an initial capacity of 10.
|
ArrayMap(int initialCapacity)
Constructs an empty ArrayMap with the specified initial capacity.
|
ArrayMap(java.util.Map<? extends K,? extends V> m)
Constructs an ArrayMap with the same mappings as the specified Map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this ArrayMap, if necessary, to be at least the
specified minimum capacity.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
int |
size() |
void |
trimToSize()
Trims the capacity of this ArrayMap to be equal to its current size.
|
java.util.Collection<V> |
values() |
public ArrayMap(int initialCapacity)
initialCapacity
- The initial capacity of the ArrayMappublic ArrayMap()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public final void trimToSize()
public final void ensureCapacity(int minCapacity)
minCapacity
- The minimum capacity that this ArrayMap should have