KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > webFlow > entities > Target


1 package com.opensymphony.webwork.webFlow.entities;
2
3
4 /**
5  * User: plightbo
6  * Date: Jun 25, 2005
7  * Time: 2:11:30 PM
8  */

9 public class Target {
10     private String JavaDoc target;
11     private int type;
12
13     public Target(String JavaDoc target, int type) {
14         this.target = target;
15         this.type = type;
16     }
17
18     public String JavaDoc getTarget() {
19         return target;
20     }
21
22     public int getType() {
23         return type;
24     }
25
26     public boolean equals(Object JavaDoc o) {
27         if (this == o) return true;
28         if (!(o instanceof Target)) return false;
29
30         final Target target1 = (Target) o;
31
32         if (type != target1.type) return false;
33         if (target != null ? !target.equals(target1.target) : target1.target != null) return false;
34
35         return true;
36     }
37
38     public int hashCode() {
39         int result;
40         result = (target != null ? target.hashCode() : 0);
41         result = 29 * result + type;
42         return result;
43     }
44 }
45
Popular Tags