Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.common.collections
Class SerializableArrayMap<K,V>

java.lang.Object
  extended by 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

Constructor Summary
SerializableArrayMap()
           
SerializableArrayMap(int initialCapacity)
           
SerializableArrayMap(Map map)
           
SerializableArrayMap(SerializableArrayMap map)
           
 
Method Summary
 void add(K key, V value)
           
 void clear()
           
 boolean equals(Object obj)
           
 V get(int i)
           
 V get(K key)
           
 Serializable[] getArray()
           
 K getKey(int i)
           
 K getKey(Serializable value)
           
 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()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializableArrayMap

public SerializableArrayMap()

SerializableArrayMap

public SerializableArrayMap(int initialCapacity)

SerializableArrayMap

public SerializableArrayMap(Map map)

SerializableArrayMap

public SerializableArrayMap(SerializableArrayMap map)
Method Detail

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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.