--- projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java 2000/12/12 20:44:30 1.9 +++ projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java 2001/01/28 05:47:05 1.10 @@ -5,11 +5,11 @@ package uk.ac.ukc.iscream.util; import java.util.*; /** - * Object in which to store incoming XML data - * to be passed around the CORBA system. + * Object in which to store incoming XML data for processing + * by a component of the system. * - * @author $Author: ajm $ - * @version $Id: XMLPacket.java,v 1.9 2000/12/12 20:44:30 ajm Exp $ + * @author $Author: tdb $ + * @version $Id: XMLPacket.java,v 1.10 2001/01/28 05:47:05 tdb Exp $ */ public class XMLPacket { @@ -18,7 +18,7 @@ public class XMLPacket { /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.9 $"; + public final String REVISION = "$Revision: 1.10 $"; //---STATIC METHODS--- @@ -28,6 +28,9 @@ public class XMLPacket { /** * Add a key and value pair to the HashMap. + * + * @param key The key value + * @param value The value associated with the key */ public synchronized void addParam (String key, String value) { _params.put(key, value); @@ -38,6 +41,9 @@ public class XMLPacket { * Returns null if the key does not exist, although * this should not necessarily indicate that the key * does not exist. + * + * @param key The key to retrieve + * @return The value associated with the key, if one exists, otherwise null. */ public synchronized String getParam (String key) { return (String) _params.get(key); @@ -45,6 +51,8 @@ public class XMLPacket { /** * Return a Set of the keys in the HashMap. + * + * @return a Set of the values in this Packet. */ public synchronized Set getSet () { return _params.keySet(); @@ -52,6 +60,9 @@ public class XMLPacket { /** * Find if a particular key exists in the HashMap. + * + * @param key The key to check for + * @return whether the key exists */ public synchronized boolean containsKey(String key){ return _params.containsKey(key); @@ -60,6 +71,8 @@ public class XMLPacket { /** * Print out the entire HashMap. * (Mainly for assisting debugging.) + * + * @return A String representation of the data in this Packet */ public synchronized String printAll () { return _params.toString(); @@ -87,6 +100,9 @@ public class XMLPacket { //---ATTRIBUTES--- + /** + * A HashMap of parameters + */ private HashMap _params = new HashMap(); /**