01: package com.teamkonzept.field;
02:
03: /**
04: * Die klasse haelt die Daten der Klasse TKFieldOption
05: * Die Daten werden in compileData() gesetzt
06: */
07: public class TKFieldOptionData {
08: public Object data;
09: public String currJaNein;
10: public String newJaNein;
11:
12: public TKFieldOptionData(String currJaNein, String newJaNein,
13: Object data) {
14: this .currJaNein = currJaNein;
15: this .newJaNein = newJaNein;
16: this .data = data;
17: }
18:
19: public boolean equals(Object other) {
20: if (other != null && getClass() == other.getClass()) {
21: TKFieldOptionData otherData = (TKFieldOptionData) other;
22: try {
23: // return false if either of the attributes in null
24: return data.equals(otherData.data)
25: && currJaNein.equals(otherData.currJaNein)
26: && newJaNein.equals(otherData.newJaNein);
27: } catch (NullPointerException npe) {
28: return false;
29: }
30: }
31: return false;
32: }
33:
34: public String toString() {
35: return "(" + "currJaNein=" + currJaNein + "," + "\nnewJaNein="
36: + newJaNein + "," + "\ndata="
37: + (data == null ? "null" : data.toString()) + "\n)";
38: }
39: }//end class
|