01: /*
02: * (C) Copyright 2004 Nabh Information Systems, Inc.
03: *
04: * All copyright notices regarding Nabh's products MUST remain
05: * intact in the scripts and in the outputted HTML.
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: *
20: */
21: package com.nabhinc.portlet.mvcportlet.core;
22:
23: /**
24: * A helper class that holds a value and a label. Used
25: * to represent value/label list for select elements.
26: *
27: * @author Padmanabh Dabke
28: * (c) 2004 Nabh Information Systems, Inc. All Rights Reserved.
29: */
30: public class ValueAndLabel {
31: private String valValue = null;
32: private String valLabel = null;
33:
34: /**
35: * Constructs ValueAndLabel object.
36: * @param value String represents value of an element.
37: * @param label String represents label of an element.
38: */
39: public ValueAndLabel(String value, String label) {
40: valValue = value;
41: valLabel = label;
42: }
43:
44: /**
45: * Returns value.
46: * @return
47: */
48: public String getValue() {
49: return valValue;
50: }
51:
52: /**
53: * Sets value.
54: * @param value
55: */
56: public void setValue(String value) {
57: valValue = value;
58: }
59:
60: /**
61: * Returns label.
62: * @return
63: */
64: public String getLabel() {
65: return valLabel;
66: }
67:
68: /**
69: * Sets label.
70: * @param label
71: */
72: public void setLabel(String label) {
73: valLabel = label;
74: }
75: }
|