Public Member Functions

org.exolab.castor.util.OrderedHashMap Class Reference

Inherits java::util::HashMap.

List of all members.

Public Member Functions

 OrderedHashMap ()
 OrderedHashMap (int initialCapacity)
 OrderedHashMap (Map m)
void clear ()
Object clone ()
Set entrySet ()
Set keySet ()
Object put (Object key, Object value)
void putAll (Map m)
Object remove (Object key)
Collection values ()

Detailed Description

A very simple extended HashMap, which maintains order via an ArrayList.

This class provides similar, though not identical, functionality as the JDK's LinkedHashMap, but works under JDK 1.2 and JDK 1.3.

This class is not synchronized, if more than one thread accesses an instance of this class and at least one thread modifies the map, the OrderedHashMap instance must be synchronized via a call to Collections.synchronizedMap method.

The entrySet() and keySet() methods return unmodifiable sets.

The values() method returns an unmodifiable collection.

Author:
Keith Visco
Revision:
1.1
Date:
2004/12/15 00:16:52

Constructor & Destructor Documentation

org.exolab.castor.util.OrderedHashMap.OrderedHashMap (  ) 
org.exolab.castor.util.OrderedHashMap.OrderedHashMap ( int  initialCapacity  ) 

Creates a new OrderedHashMap with the given initial capacity

Parameters:
initialCapacity 
org.exolab.castor.util.OrderedHashMap.OrderedHashMap ( Map  m  ) 

Creates a new OrderedHashMap with the same entries as the given map.

Parameters:
m the Map to initialize this Map with

References org.exolab.castor.util.OrderedHashMap.putAll().


Member Function Documentation

void org.exolab.castor.util.OrderedHashMap.clear (  ) 
Object org.exolab.castor.util.OrderedHashMap.clone (  ) 
Set org.exolab.castor.util.OrderedHashMap.entrySet (  ) 

Returns the Map.Entry set for this Map. Note that the returned Set is an unmodifiable Set

See also:
java.util.Map.entrySet()
Set org.exolab.castor.util.OrderedHashMap.keySet (  ) 

Returns the key set for this Map. Note that the returned set is an unmodifiable Set

See also:
java.util.Map.keySet()

Referenced by org.exolab.javasource.JAnnotation.getElementNames().

Object org.exolab.castor.util.OrderedHashMap.put ( Object  key,
Object  value 
)
void org.exolab.castor.util.OrderedHashMap.putAll ( Map  m  ) 
Object org.exolab.castor.util.OrderedHashMap.remove ( Object  key  ) 
Collection org.exolab.castor.util.OrderedHashMap.values (  ) 

Returns the set of values for this Map. Note that the returned Collection is unmodifiable.

See also:
java.util.Map.values()

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties