KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dbforms > util > KeyValuePair


1 /*
2  * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/util/KeyValuePair.java,v 1.8 2004/08/18 12:26:09 hkollmann Exp $
3  * $Revision: 1.8 $
4  * $Date: 2004/08/18 12:26:09 $
5  *
6  * DbForms - a Rapid Application Development Framework
7  * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23
24 /**
25  * this class was introduced in DbForms 0.9 it is used for holding simple data
26  * for example in EmbeddedData - Classes
27  */

28 package org.dbforms.util;
29
30
31 /**
32  * Description of the Class
33  *
34  * @author foxat
35  *
36  */

37 public class KeyValuePair {
38    private String JavaDoc key;
39    private String JavaDoc value;
40
41    /**
42     * Creates a new KeyValuePair object.
43     */

44    public KeyValuePair() {
45    }
46
47
48    /**
49     * Creates a new KeyValuePair object.
50     *
51     * @param key the key value
52     * @param value the value related to the key
53     */

54    public KeyValuePair(String JavaDoc key,
55                        String JavaDoc value) {
56       this.key = key;
57       this.value = value;
58    }
59
60    /**
61     * Sets the key attribute of the KeyValuePair object
62     *
63     * @param key The new key value
64     */

65    public void setKey(String JavaDoc key) {
66       this.key = key;
67    }
68
69
70    /**
71     * Gets the key attribute of the KeyValuePair object
72     *
73     * @return The key value
74     */

75    public String JavaDoc getKey() {
76       return key;
77    }
78
79
80    /**
81     * Sets the value attribute of the KeyValuePair object
82     *
83     * @param value The new value value
84     */

85    public void setValue(String JavaDoc value) {
86       this.value = value;
87    }
88
89
90    /**
91     * Gets the value attribute of the KeyValuePair object
92     *
93     * @return The value value
94     */

95    public String JavaDoc getValue() {
96       return value;
97    }
98 }
99
Popular Tags