Class HashMap

java.lang.Object
   |
   +----HashMap

public class HashMap
extends Object
Simple implementation of a map (key-value pair). This class just a wrapper on HashTable until the new JDK 1.2 HashMap interface becomes available.

Version:
0.1
Author:
Jörg Caumanns

Constructor Index

 o HashMap()
constructor

Method Index

 o get(Object)
Retrieve an object from the map.
 o put(Object, Object)
Add an object to the map.
 o remove(Object)
Remove an key from the set.

Constructors

 o HashMap
 public HashMap()
constructor

Methods

 o put
 public synchronized Object put(Object key,
                                Object value)
Add an object to the map. If the object with the given key already exists within the map it is overwritten. If the object was newly added, nul is returned otherwise the old value associated with the given key.

 o get
 public synchronized Object get(Object key)
Retrieve an object from the map.

 o remove
 public synchronized Object remove(Object key)
Remove an key from the set. If the key could be removed the appropriate object is returned, otherwise null.