ecologylab.generic
Class HashMapArrayList<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by ecologylab.generic.HashMapArrayList<K,V>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
Direct Known Subclasses:
HashMappableArrayList

public class HashMapArrayList<K,V>
extends java.util.HashMap<K,V>

A HashMap with an ArrayList backing store, for speedy linear and hashed access.

Author:
andruid
See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<V> arrayList
           
 
Constructor Summary
HashMapArrayList()
           
HashMapArrayList(int arg0)
           
HashMapArrayList(int arg0, float arg1)
           
HashMapArrayList(java.util.Map arg0)
           
 
Method Summary
 void clear()
           
 V get(int index)
           
 java.util.Iterator<V> iterator()
           
 V put(K key, V value)
           
 void recycle()
           
 V remove(java.lang.Object key)
           
 java.util.Collection<V> values()
           
 
Methods inherited from class java.util.HashMap
clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

arrayList

protected final java.util.ArrayList<V> arrayList
Constructor Detail

HashMapArrayList

public HashMapArrayList()

HashMapArrayList

public HashMapArrayList(int arg0)
Parameters:
arg0 -

HashMapArrayList

public HashMapArrayList(java.util.Map arg0)
Parameters:
arg0 -

HashMapArrayList

public HashMapArrayList(int arg0,
                        float arg1)
Parameters:
arg0 -
arg1 -
Method Detail

put

public V put(K key,
             V value)
Specified by:
put in interface java.util.Map<K,V>
Overrides:
put in class java.util.HashMap<K,V>

get

public V get(int index)

iterator

public java.util.Iterator<V> iterator()

remove

public V remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<K,V>
Overrides:
remove in class java.util.HashMap<K,V>

clear

public void clear()
Specified by:
clear in interface java.util.Map<K,V>
Overrides:
clear in class java.util.HashMap<K,V>

recycle

public void recycle()

values

public java.util.Collection<V> values()
Specified by:
values in interface java.util.Map<K,V>
Overrides:
values in class java.util.HashMap<K,V>