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.2 by pjm2, Thu Nov 23 09:36:07 2000 UTC vs.
Revision 1.3 by tdb, Wed Nov 29 19:11:53 2000 UTC

# Line 1 | Line 1
1 + //---PACKAGE DECLARATION---
2 + package uk.ac.ukc.iscream.xml;
3 +
4 + //---IMPORTS---
5   import java.util.HashMap;
6  
7 < // Paul Mutton, pjm2@ukc.ac.uk
8 <
9 < // Object in which to store incoming XML data
10 < // to be passed around the CORBA system.
7 > /**
8 > * Object in which to store incoming XML data
9 > * to be passed around the CORBA system.
10 > *
11 > * @author  $Author$
12 > * @version $Id$
13 > */
14   public class XMLPacket {
15  
16 + //---FINAL ATTRIBUTES---
17 +
18 +    /**
19 +     * The current CVS revision of this class
20 +     */
21 +    public final String REVISION = "$Revision$";
22 +    
23 + //---STATIC METHODS---
24 +
25 + //---CONSTRUCTORS---
26 +
27 + //---PUBLIC METHODS---
28 +
29      // Add a key and value pair to the HashMap.
30      public synchronized void addParam (String key, String value) {
31          params.put(key, value);        
# Line 28 | Line 48 | public class XMLPacket {
48          return params.toString();
49      }
50  
51 <    private HashMap params = new HashMap();  
52 <    
53 < }
51 >    /**
52 >     * Overrides the {@link java.lang.Object#toString() Object.toString()}
53 >     * method to provide clean logging (every class should have this).
54 >     *
55 >     * @return the name of this class and its CVS revision
56 >     */
57 >    public String toString() {
58 >        return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")";
59 >    }
60 >
61 > //---PRIVATE METHODS---
62 >
63 > //---ACCESSOR/MUTATOR METHODS---
64 >
65 > //---ATTRIBUTES---
66 >
67 >    private HashMap params = new HashMap();
68 >
69 > //---STATIC ATTRIBUTES---
70 >
71 > }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines