org.nuxeo.common.collections
Class SerializableArrayMap<K,V>
java.lang.Object
org.nuxeo.common.collections.SerializableArrayMap<K,V>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- FromList, SelectList
public class SerializableArrayMap<K,V>
- extends java.lang.Object
- implements java.io.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
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
SerializableArrayMap
public SerializableArrayMap()
SerializableArrayMap
public SerializableArrayMap(int initialCapacity)
SerializableArrayMap
public SerializableArrayMap(java.util.Map map)
SerializableArrayMap
public SerializableArrayMap(SerializableArrayMap map)
putAll
public void putAll(java.util.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(java.io.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 java.io.Serializable[] getArray()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2010 Nuxeo SAS. All Rights Reserved.