org.nuxeo.common.collections
Class ArrayMap<K,V>
java.lang.Object
org.nuxeo.common.collections.ArrayMap<K,V>
public class ArrayMap<K,V>
- extends Object
A mixture of an array list and a map used to store
small table of elements using both indices and keys.
This map accepts null values.
The map is implemented using an array of successive [key, value] pairs.
- Author:
- Bogdan Stefanescu
ArrayMap
public ArrayMap()
ArrayMap
public ArrayMap(int initialCapacity)
ArrayMap
public ArrayMap(Map<K,V> map)
ArrayMap
public ArrayMap(ArrayMap<K,V> map)
putAll
public void putAll(Map<K,V> map)
remove
public V remove(K key)
remove
public V remove(int index)
get
public V get(K key)
get
public V get(int i)
getKey
public K getKey(Object value)
getKey
public K getKey(int i)
put
public V put(K key,
V value)
add
public void add(K key,
V value)
trimToSize
public void trimToSize()
size
public int size()
isEmpty
public boolean isEmpty()
clear
public void clear()
getArray
public Object[] getArray()
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2011 Nuxeo SAS. All Rights Reserved.