01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.common.web.template;
09:
10: //base classes
11: import java.util.HashMap;
12:
13: //project specific classes
14: import org.jfolder.common.UnexpectedSystemException;
15: import org.jfolder.common.utils.misc.MiscHelper;
16:
17: //other classes
18:
19: public class CreationParameterContextInput {
20:
21: //
22: private String type = null;
23: private String label = null;
24: private String value = null;
25: private String list = null;
26: private String listLabels = null;
27:
28: protected CreationParameterContextInput(String inType,
29: String inLabel, String inValue, String inList,
30: String inListLabels) {
31: //
32: this .type = inType;
33: this .label = inLabel;
34: this .value = inValue;
35: this .list = inList;
36: this .listLabels = inListLabels;
37: }
38:
39: //
40: public int hashCode() {
41:
42: int outValue = 0;
43:
44: outValue += MiscHelper.hashCodeOrZero(this .type);
45: outValue += MiscHelper.hashCodeOrZero(this .label);
46: outValue += MiscHelper.hashCodeOrZero(this .value);
47: outValue += MiscHelper.hashCodeOrZero(this .list);
48: outValue += MiscHelper.hashCodeOrZero(this .listLabels);
49:
50: return outValue;
51: }
52:
53: public boolean equals(Object inObj) {
54:
55: boolean outValue = true;
56:
57: if (inObj instanceof CreationParameterContextInput) {
58: CreationParameterContextInput nextCpci = ((CreationParameterContextInput) inObj);
59: outValue &= MiscHelper.equalsOrNull(this .type,
60: nextCpci.type);
61: outValue &= MiscHelper.equalsOrNull(this .label,
62: nextCpci.label);
63: outValue &= MiscHelper.equalsOrNull(this .value,
64: nextCpci.value);
65: outValue &= MiscHelper.equalsOrNull(this .list,
66: nextCpci.list);
67: outValue &= MiscHelper.equalsOrNull(this .listLabels,
68: nextCpci.listLabels);
69: } else {
70: outValue &= false;
71: }
72:
73: return outValue;
74: }
75:
76: //
77: public String getType() {
78: return this .type;
79: }
80:
81: public String getLabel() {
82: return this .label;
83: }
84:
85: public String getValue() {
86: return this .value;
87: }
88:
89: public String getList() {
90: return this .list;
91: }
92:
93: public String getListLabels() {
94: return this .listLabels;
95: }
96: //
97: }
|