chrriis.uihierarchy.compatibility
Class HashMap

java.lang.Object
  extended bychrriis.uihierarchy.compatibility.HashMap
All Implemented Interfaces:
Map

public class HashMap
extends Object
implements Map

The HashMap compatible version.

Version:
1.0 2003.
Author:
Christopher Deckers (chrriis@brainlex.com)

Constructor Summary
HashMap()
          Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75).
HashMap(int initialCapacity)
          Constructs an empty HashMap with the specified initial capacity and the default load factor (0.75).
 
Method Summary
 boolean containsKey(Object key)
          Returns true if this map contains a mapping for the specified key.
 Object get(Object key)
          Returns the value to which this map maps the specified key.
 Set keySet()
          Returns a set view of the keys contained in this map.
 Object put(Object key, Object value)
          Associates the specified value with the specified key in this map (optional operation).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMap

public HashMap()
Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75).


HashMap

public HashMap(int initialCapacity)
Constructs an empty HashMap with the specified initial capacity and the default load factor (0.75).

Parameters:
initialCapacity - The initial capacity.
Method Detail

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.

Specified by:
containsKey in interface Map
Parameters:
key - The key.
Returns:
True if found.

get

public Object get(Object key)
Returns the value to which this map maps the specified key.

Specified by:
get in interface Map
Parameters:
key - The key.
Returns:
The object.

put

public Object put(Object key,
                  Object value)
Associates the specified value with the specified key in this map (optional operation).

Specified by:
put in interface Map
Parameters:
key - The key.
value - The value.
Returns:
The previous value.

keySet

public Set keySet()
Returns a set view of the keys contained in this map.

Specified by:
keySet in interface Map
Returns:
The set.