02/28/2005
 

com.epicentric.common
Class OrderedHashMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--com.epicentric.common.OrderedHashMap
All Implemented Interfaces:
Cloneable, Map, Map, Serializable, Serializable

Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. If using J2SE 1.4 or later, recommend looking at the LinkedHashMap.

public class OrderedHashMap
extends HashMap
implements Serializable

OrderedHashMap retrieves keys and values in the order that they were inserted.

Since:
version 4.0
See Also:
HashMap, Serialized Form

Constructor Summary
OrderedHashMap()
          Deprecated. Constructs a new, empty map with a default capacity and load factor, which is 0.75.
OrderedHashMap(int initialCapacity)
          Deprecated. Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75.
OrderedHashMap(int initialCapacity, float loadFactor)
          Deprecated. Constructs a new, empty map with the specified initial capacity and the specified load factor.
 
Method Summary
 Set entrySet()
          Deprecated. An OrderedHashMap does not support this operation
 Set keySet()
          Deprecated. An OrderedHashMap does not support this operation.
 List orderedKeys()
          Deprecated. Gets all the keys, in the order they were inserted.
 Object put(Object key, Object value)
          Deprecated. Associates the specified value with the specified key in this map.
 Object remove(Object key)
          Deprecated. Removes the mapping for this key from this map if present.
 Collection values()
          Deprecated. Returns a set of values in the order that they were inserted.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, get, isEmpty, 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
 

Constructor Detail

OrderedHashMap

public OrderedHashMap()
Deprecated. 
Constructs a new, empty map with a default capacity and load factor, which is 0.75.

OrderedHashMap

public OrderedHashMap(int initialCapacity)
Deprecated. 
Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75.
Parameters:
initialCapacity - the initial capacity of the HashMap.

OrderedHashMap

public OrderedHashMap(int initialCapacity,
                      float loadFactor)
Deprecated. 
Constructs a new, empty map with the specified initial capacity and the specified load factor.
Parameters:
initialCapacity - the initial capacity of the HashMap.
loadFactor - the load factor of the HashMap
Method Detail

put

public Object put(Object key,
                  Object value)
Deprecated. 
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.
Overrides:
put in class HashMap
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.

orderedKeys

public List orderedKeys()
Deprecated. 
Gets all the keys, in the order they were inserted.

values

public Collection values()
Deprecated. 
Returns a set of values in the order that they were inserted.
Overrides:
values in class HashMap

keySet

public Set keySet()
Deprecated. 
An OrderedHashMap does not support this operation.
Overrides:
keySet in class HashMap

entrySet

public Set entrySet()
Deprecated. 
An OrderedHashMap does not support this operation
Overrides:
entrySet in class HashMap

remove

public Object remove(Object key)
Deprecated. 
Removes the mapping for this key from this map if present.
Overrides:
remove in class HashMap
Parameters:
key - key whose mapping is to be removed from the map.

02/28/2005
 

Copyright and Trademark Notices