com.opensymphony.util
Class OrderedMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by com.opensymphony.util.OrderedMap
All Implemented Interfaces:
Serializable, Cloneable, Map

Deprecated. If you need special data structures like this, we recommend you check out the Jakarta commons-collections project.

public class OrderedMap
extends HashMap

Extention of java.util.HashMap that can retain original order elements were add in.

Uses an internal java.util.LinkedList which can be iterated through by accessing iterator().

Version:
$Revision: 1.1.1.1 $
Author:
Joe Walnes
See Also:
HashMap, Serialized Form

Constructor Summary
OrderedMap()
          Deprecated.  
 
Method Summary
 void clear()
          Deprecated. Overrides superclass.
 Iterator iterator()
          Deprecated. Return keys in original order.
 Object put(Object key, Object value)
          Deprecated. Overrides superclass.
 Object remove(Object key)
          Deprecated. Overrides superclass.
 
Methods inherited from class java.util.HashMap
clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, size, values
 
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
 

Constructor Detail

OrderedMap

public OrderedMap()
Deprecated. 
Method Detail

clear

public void clear()
Deprecated. 
Overrides superclass.

Specified by:
clear in interface Map
Overrides:
clear in class HashMap

iterator

public Iterator iterator()
Deprecated. 
Return keys in original order.

Returns:
Iteration of keys.

put

public Object put(Object key,
                  Object value)
Deprecated. 
Overrides superclass.

Specified by:
put in interface Map
Overrides:
put in class HashMap

remove

public Object remove(Object key)
Deprecated. 
Overrides superclass.

Specified by:
remove in interface Map
Overrides:
remove in class HashMap

OSCore Project Page