ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/XMLReader/XMLPacket.java
Revision: 1.1
Committed: Tue Nov 14 09:48:06 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Log Message:
Created the XMLPacket class.  This uses a hash map to store and access
values by key strings.

File Contents

# User Rev Content
1 pjm2 1.1 import java.util.HashMap;
2    
3     // Paul Mutton, pjm2@ukc.ac.uk
4    
5     // Object in which to store incoming XML data
6     // to be passed around the CORBA system.
7     public class XMLPacket {
8    
9     // Add a key and value pair to the HashMap.
10     public void addParam(String key, String value){
11     params.put(key, value);
12     }
13    
14     // Return the value associated with a particular key.
15     // Returns null if the key does not exist, although
16     // this should not necessarily indicate that the key
17     // does not exist.
18     public String getParam(String key){
19     return (String)params.get(key);
20     }
21    
22     private HashMap params = new HashMap();
23    
24     }