ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java (file contents):
Revision 1.9 by ajm, Tue Dec 12 20:44:30 2000 UTC vs.
Revision 1.10 by tdb, Sun Jan 28 05:47:05 2001 UTC

# Line 5 | Line 5 | package uk.ac.ukc.iscream.util;
5   import java.util.*;
6  
7   /**
8 < * Object in which to store incoming XML data
9 < * to be passed around the CORBA system.
8 > * Object in which to store incoming XML data for processing
9 > * by a component of the system.
10   *
11   * @author  $Author$
12   * @version $Id$
# Line 28 | Line 28 | public class XMLPacket {
28  
29      /**
30       * Add a key and value pair to the HashMap.
31 +     *
32 +     * @param key The key value
33 +     * @param value The value associated with the key
34       */
35      public synchronized void addParam (String key, String value) {
36          _params.put(key, value);
# Line 38 | Line 41 | public class XMLPacket {
41       * Returns null if the key does not exist, although
42       * this should not necessarily indicate that the key
43       * does not exist.
44 +     *
45 +     * @param key The key to retrieve
46 +     * @return The value associated with the key, if one exists, otherwise null.
47       */
48      public synchronized String getParam (String key) {
49          return (String) _params.get(key);
# Line 45 | Line 51 | public class XMLPacket {
51      
52      /**
53       * Return a Set of the keys in the HashMap.
54 +     *
55 +     * @return a Set of the values in this Packet.
56       */
57      public synchronized Set getSet () {
58          return _params.keySet();
# Line 52 | Line 60 | public class XMLPacket {
60      
61      /**
62       * Find if a particular key exists in the HashMap.
63 +     *
64 +     * @param key The key to check for
65 +     * @return whether the key exists
66       */
67      public synchronized boolean containsKey(String key){
68          return _params.containsKey(key);
# Line 60 | Line 71 | public class XMLPacket {
71      /**
72       * Print out the entire HashMap.
73       * (Mainly for assisting debugging.)
74 +     *
75 +     * @return A String representation of the data in this Packet
76       */
77      public synchronized String printAll () {
78          return _params.toString();
# Line 87 | Line 100 | public class XMLPacket {
100  
101   //---ATTRIBUTES---
102  
103 +    /**
104 +     * A HashMap of parameters
105 +     */
106      private HashMap _params = new HashMap();
107  
108      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines