01: package com.teamkonzept.field;
02:
03: /**
04: * The option field entry.
05: *
06: * @author $Author: uli $
07: * @version $Revision: 1.11 $
08: */
09: public class TKOptionFieldEntry {
10: // $Id: TKOptionFieldEntry.java,v 1.11 2002/02/27 11:07:04 uli Exp $
11:
12: public final static String OPTION_KEY = "OPTION";
13: public final static String VALUE_KEY = "VALUE";
14:
15: /**
16: * The selected option.
17: */
18: public String option = null;
19:
20: /**
21: * The option value.
22: */
23: public String value;
24:
25: public TKOptionFieldEntry(String option, String value) {
26: this .option = option;
27: this .value = value;
28: }
29:
30: /**
31: * Checks wether this object and the specified object
32: * may be treated as equal.
33: *
34: * @param object the object to checked for equality.
35: * @return <CODE>true</CODE> if this object and the
36: * specified object may be treated as equal, otherwise
37: * <CODE>false</CODE>.
38: */
39: public boolean equals(Object object) {
40: if (object == null) {
41: return false;
42: }
43:
44: if (object == this ) {
45: return true;
46: }
47:
48: if (!this .getClass().equals(object.getClass())) {
49: return false;
50: }
51:
52: TKOptionFieldEntry field = (TKOptionFieldEntry) object;
53:
54: return (this .option == null ? field.option == null
55: : this .option.equals(field.option))
56: && (this .value == null ? field.value == null
57: : this .value.equals(field.value));
58: }
59:
60: /**
61: * Returns the hash code for this object.
62: *
63: * @return the hash code for this object.
64: */
65: public int hashCode() {
66: // Implementation for JTest only ;-(
67: return super.hashCode();
68: }
69:
70: }
|