01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/field/TKFieldSwitchData.java,v 1.9 2001/06/19 11:52:49 ralf Exp $
03: *
04: */
05: package com.teamkonzept.field;
06:
07: public class TKFieldSwitchData {
08: public Object data;
09: public String alternative;
10: public String newAlternative;
11:
12: public TKFieldSwitchData(String alternative, String newAlternative,
13: Object data) {
14: this .alternative = alternative;
15: this .newAlternative = newAlternative;
16: this .data = data;
17: }
18:
19: public String toString() {
20: return "( alternative = \"" + alternative
21: + "\", newAlternative = \"" + newAlternative
22: + "\", data="
23: + (data == null ? "(null)" : data.toString()) + " )";
24: }
25:
26: public boolean equals(Object other) {
27: if (other != null && getClass() == other.getClass()) {
28: TKFieldSwitchData otherData = (TKFieldSwitchData) other;
29: return data.equals(otherData.data)
30: && alternative.equals(otherData.alternative)
31: && newAlternative.equals(otherData.newAlternative);
32: }
33: return false;
34: }
35: }
|