realized there were two print statements in regression testin different SESEs, breaks...
[IRC.git] / Robust / src / Analysis / MLP / SESEEffectsKey.java
1 package Analysis.MLP;
2
3 import IR.TypeDescriptor;
4
5 public class SESEEffectsKey {
6
7         private String fd;
8         private TypeDescriptor td;
9         private Integer hrnId;
10         private String hrnUniqueId;
11         private boolean wStrong=false;
12
13         public SESEEffectsKey(String fd, TypeDescriptor td, Integer hrnId, String hrnUniqueId) {
14                 this.fd = fd;
15                 this.td = td;
16                 this.hrnId = hrnId;
17                 this.hrnUniqueId=hrnUniqueId;
18         }
19         
20         public void setStrong(boolean wStrong){
21                 this.wStrong=wStrong;
22         }
23         
24         public boolean isStrong(){
25                 return wStrong;
26         }
27
28         public String getFieldDescriptor() {
29                 return fd;
30         }
31
32         public TypeDescriptor getTypeDescriptor() {
33                 return td;
34         }
35
36         public Integer getHRNId() {
37                 return hrnId;
38         }
39         
40         public String getHRNUniqueId(){
41                 return hrnUniqueId;
42         }
43
44         public String toString() {
45                 return "(" + td + ")" + fd + "#" + hrnId+":"+hrnUniqueId;
46         }
47
48         public int hashCode() {
49
50                 int hash = 1;
51
52                 if (fd != null) {
53                         hash = hash * 31 + fd.hashCode();
54                 }
55
56                 if (td != null) {
57                         hash += td.getSymbol().hashCode();
58                 }
59
60                 if (hrnId != null) {
61                         hash += hrnId.hashCode();
62                 }
63
64                 return hash;
65
66         }
67
68         public boolean equals(Object o) {
69
70                 if (o == null) {
71                         return false;
72                 }
73
74                 if (!(o instanceof SESEEffectsKey)) {
75                         return false;
76                 }
77
78                 SESEEffectsKey in = (SESEEffectsKey) o;
79
80                 if (fd.equals(in.getFieldDescriptor())
81                                 && td.getSymbol().equals(in.getTypeDescriptor().getSymbol())
82                                 && hrnId.equals(in.getHRNId())) {
83                         return true;
84                 } else {
85                         return false;
86                 }
87
88         }
89         
90 }