01: package org.directwebremoting.convert.mapped;
02:
03: import org.directwebremoting.util.CompareUtil;
04:
05: /**
06: * An example that is mapped to the object converter
07: * @author Joe Walker [joe at getahead dot ltd dot uk]
08: */
09: public class ObjectEx {
10: public ObjectEx() {
11: }
12:
13: public ObjectEx(String name) {
14: this .name = name;
15: }
16:
17: public String name;
18:
19: private String hidden;
20:
21: @Override
22: public String toString() {
23: return "ObjectEx[" + name + "]";
24: }
25:
26: @Override
27: public boolean equals(Object obj) {
28: if (obj == null) {
29: return false;
30: }
31:
32: if (obj == this ) {
33: return true;
34: }
35:
36: if (!this .getClass().equals(obj.getClass())) {
37: return false;
38: }
39:
40: ObjectEx that = (ObjectEx) obj;
41:
42: if (!CompareUtil.equals(this .name, that.name)) {
43: return false;
44: }
45:
46: return true;
47: }
48:
49: void shutupStupidCompiler() {
50: System.getProperty(name, hidden);
51: }
52: }
|