| 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 |
|
|
} |