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, which requires use of the
07: * force parameter to read the name member
08: * @author Joe Walker [joe at getahead dot ltd dot uk]
09: */
10: public class ObjectForceEx {
11: public ObjectForceEx() {
12: }
13:
14: public ObjectForceEx(String name) {
15: this .name = name;
16: }
17:
18: private String name;
19:
20: @Override
21: public String toString() {
22: return "ObjectForceEx[" + name + "]";
23: }
24:
25: @Override
26: public boolean equals(Object obj) {
27: if (obj == null) {
28: return false;
29: }
30:
31: if (obj == this ) {
32: return true;
33: }
34:
35: if (!this .getClass().equals(obj.getClass())) {
36: return false;
37: }
38:
39: ObjectForceEx that = (ObjectForceEx) obj;
40:
41: if (!CompareUtil.equals(this .name, that.name)) {
42: return false;
43: }
44:
45: return true;
46: }
47:
48: void shutupStupidCompiler() {
49: System.getProperty(name, name);
50: }
51: }
|