1 package org.apache.turbine.util.uri;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.commons.lang.StringUtils;
20
21 /***
22 * Helper Class to keep a key and a value together in
23 * one object. Used for URI Parameters
24 *
25 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
26 * @version $Id: URIParam.java 264148 2005-08-29 14:21:04Z henning $
27 */
28
29 public class URIParam
30 {
31 /*** Key */
32 private String key = null;
33
34 /*** Value */
35 private Object value = null;
36
37 /***
38 * Creates a new Object from Key and Value
39 *
40 * @param key A String with the Param Name.
41 * @param value An Object with the Value.
42 *
43 */
44 public URIParam(String key, Object value)
45 {
46 this.key = key;
47 this.value = value;
48 }
49
50 /***
51 * Returns the key.
52 *
53 * @return The key value.
54 *
55 */
56 public String getKey()
57 {
58 return (StringUtils.isNotEmpty(key)) ? key : "";
59 }
60
61 /***
62 * Returns the value.
63 *
64 * @return The value of this object.
65 *
66 */
67 public Object getValue()
68 {
69 return value;
70 }
71 }