going to start with just enough definite reach analysis to do a simple example
[IRC.git] / Robust / src / Analysis / Disjoint / EdgeKey.java
1 package Analysis.Disjoint;
2
3 import IR.*;
4
5
6 public class EdgeKey {
7   private Integer srcId;
8   private Integer dstId;
9   private FieldDescriptor f;
10
11   public EdgeKey(Integer srcId, Integer dstId, FieldDescriptor f) {
12     this.srcId = srcId;
13     this.dstId = dstId;
14     this.f     = f;
15   }
16
17   public Integer getSrcId() {
18     return srcId;
19   }
20
21   public Integer getDstId() {
22     return dstId;
23   }
24
25   public FieldDescriptor getField() {
26     return f;
27   }
28
29   public boolean equals(Object o) {
30     if(this == o) {
31       return true;
32     }
33     if(o == null) {
34       return false;
35     }
36     if(!(o instanceof EdgeKey)) {
37       return false;
38     }
39
40     EdgeKey ek = (EdgeKey) o;
41
42     return 
43       this.srcId.equals(ek.srcId) &&
44       this.dstId.equals(ek.dstId) &&
45       this.f.equals(ek.f);
46   }
47
48   public int hashCode() {
49     return srcId.hashCode() ^ dstId.hashCode() ^ f.hashCode();
50   }
51 }