01: package com.opensymphony.webwork.sitegraph.entities;
02:
03: /**
04: * User: plightbo
05: * Date: Jun 25, 2005
06: * Time: 2:11:30 PM
07: */
08: public class Target {
09: private String target;
10: private int type;
11:
12: public Target(String target, int type) {
13: this .target = target;
14: this .type = type;
15: }
16:
17: public String getTarget() {
18: return target;
19: }
20:
21: public int getType() {
22: return type;
23: }
24:
25: public boolean equals(Object o) {
26: if (this == o)
27: return true;
28: if (!(o instanceof Target))
29: return false;
30:
31: final Target target1 = (Target) o;
32:
33: if (type != target1.type)
34: return false;
35: if (target != null ? !target.equals(target1.target)
36: : target1.target != null)
37: return false;
38:
39: return true;
40: }
41:
42: public int hashCode() {
43: int result;
44: result = (target != null ? target.hashCode() : 0);
45: result = 29 * result + type;
46: return result;
47: }
48: }
|