public class ArrayMap<K,V> extends Object
This map accepts null values.
The map is implemented using an array of successive [key, value] pairs.
Modifier and Type | Field and Description |
---|---|
protected int |
count |
protected static int |
DEFAULT_SIZE |
protected Object[] |
elements |
protected static int |
GROW_SIZE |
Constructor and Description |
---|
ArrayMap() |
ArrayMap(ArrayMap<K,V> map) |
ArrayMap(int initialCapacity) |
ArrayMap(Map<K,V> map) |
Modifier and Type | Method and Description |
---|---|
protected V |
_remove(int i) |
void |
add(K key,
V value) |
void |
clear() |
boolean |
equals(Object obj) |
V |
get(int i) |
V |
get(K key) |
Object[] |
getArray() |
K |
getKey(int i) |
K |
getKey(Object value) |
protected void |
grow() |
int |
hashCode() |
boolean |
isEmpty() |
V |
put(K key,
V value) |
void |
putAll(Map<K,V> map) |
V |
remove(int index) |
V |
remove(K key) |
int |
size() |
void |
trimToSize() |
protected static final int DEFAULT_SIZE
protected static final int GROW_SIZE
protected int count
public void trimToSize()
public int size()
public boolean isEmpty()
public void clear()
protected void grow()
Copyright © 2015 Nuxeo SA. All rights reserved.