1 package Analysis.OoOJava;
3 import java.util.HashSet;
6 import IR.Flat.TempDescriptor;
8 public class WaitingElement {
12 private String dynID = "";
13 private TempDescriptor tempDesc;
15 // if scc/coarse represents more than one waiting elements
16 // ignored waiting element is inserted into a set of waiting element as a bogus element
17 private boolean bogus = false;
19 // a set of tempDescriptors:
20 // all associated with coarse conflicts for the same queue and the same sese
21 private Set<TempDescriptor> tempSet;
23 public WaitingElement() {
24 tempSet = new HashSet<TempDescriptor>();
27 public void addTempDesc(TempDescriptor tempDesc) {
28 tempSet.add(tempDesc);
31 public Set<TempDescriptor> getTempDescSet() {
35 public void setTempDesc(TempDescriptor tempDesc) {
36 this.tempDesc = tempDesc;
39 public TempDescriptor getTempDesc() {
43 public void setQueueID(int queueID) {
44 this.queueID = queueID;
47 public String getDynID() {
51 public void setDynID(String dynID) {
55 public int getQueueID() {
59 public void setStatus(int status) {
63 public int getStatus() {
67 public boolean equals(Object o) {
73 if (!(o instanceof WaitingElement)) {
77 WaitingElement in = (WaitingElement) o;
79 if (queueID == in.getQueueID() && status == in.getStatus() && dynID.equals(in.getDynID()) && tempDesc.equals(in.getTempDesc())) {
87 public String toString() {
88 return "[waitingID=" + queueID + " status=" + status + " dynID=" + dynID + " td= "+tempDesc+" isBogus="+ bogus+"]";
91 public int hashCode() {
95 hash = hash * 31 + queueID;
99 hash += dynID.hashCode();
105 public boolean isBogus() {
109 public void setBogus(boolean b) {