org.nuxeo.common.collections
Class SerializableArrayMap<K,V>
java.lang.Object
org.nuxeo.common.collections.SerializableArrayMap<K,V>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- FromList, SelectList
public class SerializableArrayMap<K,V>
- extends Object
- implements Serializable
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, Julien Anguenot
- See Also:
- Serialized Form
SerializableArrayMap
public SerializableArrayMap()
SerializableArrayMap
public SerializableArrayMap(int initialCapacity)
SerializableArrayMap
public SerializableArrayMap(Map map)
SerializableArrayMap
public SerializableArrayMap(SerializableArrayMap 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(Serializable 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 Serializable[] 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.