KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > jobs > elements > NameValuePair


1 package org.oddjob.jobs.elements;
2
3 /**
4  * A simple class that wraps a name value pair.
5  */

6 public class NameValuePair {
7
8     /**
9      * The name.
10      */

11     private String JavaDoc name;
12     
13     /**
14      * The value.
15      */

16     private String JavaDoc value;
17     
18     /**
19      * Set the name.
20      *
21      * @param name The name.
22      */

23     public void setName(String JavaDoc name) {
24         this.name = name;
25     }
26     
27     /**
28      * Get the name.
29      *
30      * @return The name.
31      */

32     public String JavaDoc getName() {
33         return this.name;
34     }
35     
36     /**
37      * Set the value.
38      *
39      * @param value The value.
40      */

41     public void setValue(String JavaDoc value) {
42         this.value=value;
43     }
44     
45     /**
46      * Get the value.
47      *
48      * @return The value.
49      */

50     public String JavaDoc getValue() {
51         return this.value;
52     }
53     
54     /**
55      * Add text to the value.
56      *
57      * @param text Text to add to the value.
58      */

59     public void addText(String JavaDoc text) {
60         value += text;
61     }
62 }
63
Popular Tags