35dc3b555f7a416f3f0ff0da2c331aa246dfaa90
[IRC.git] / Robust / src / Analysis / OoOJava / WaitingElement.java
1 package Analysis.OoOJava;
2
3 import IR.Flat.TempDescriptor;
4
5 public class WaitingElement {
6
7         private int queueID;
8         private int status;
9         private String dynID="";
10         private TempDescriptor tempDesc;
11         
12         public void setTempDesc(TempDescriptor tempDesc){
13                 this.tempDesc=tempDesc;
14         }
15         
16         public TempDescriptor getTempDesc(){
17                 return tempDesc;
18         }
19
20         public void setQueueID(int queueID) {
21                 this.queueID = queueID;
22         }
23         
24         public String getDynID(){
25                 return dynID;
26         }
27         
28         public void setDynID(String dynID){
29                 this.dynID=dynID;
30         }
31         
32         public int getQueueID() {
33                 return queueID;
34         }
35
36         public void setStatus(int status) {
37                 this.status = status;
38         }
39
40         public int getStatus() {
41                 return status;
42         }
43
44         public boolean equals(Object o) {
45
46                 if (o == null) {
47                         return false;
48                 }
49
50                 if (!(o instanceof WaitingElement)) {
51                         return false;
52                 }
53
54                 WaitingElement in = (WaitingElement) o;
55
56                 if (queueID == in.getQueueID() && status == in.getStatus() && dynID.equals(in.getDynID()) ) {
57                         return true;
58                 } else {
59                         return false;
60                 }
61
62         }
63
64         public String toString() {
65                 return "[waitingID=" + queueID + " status=" + status + " dynID="
66                                 + dynID + "]";
67         }
68
69         public int hashCode() {
70
71                 int hash = 1;
72
73                 hash = hash * 31 + queueID;
74
75                 hash += status;
76                 
77                 hash += dynID.hashCode();
78
79                 return hash;
80
81         }
82
83 }