3 import java.util.HashSet;
4 import java.util.Iterator;
6 public class WaitingElement {
10 private HashSet<Integer> allocList;
12 public WaitingElement() {
13 this.allocList = new HashSet<Integer>();
16 public void setWaitingID(int waitingID) {
17 this.waitingID = waitingID;
20 public int getWaitingID() {
24 public void setStatus(int status) {
28 public int getStatus() {
32 public HashSet<Integer> getAllocList() {
36 public void setAllocList(HashSet<Integer> allocList) {
37 this.allocList.addAll(allocList);
40 public boolean equals(Object o) {
46 if (!(o instanceof WaitingElement)) {
50 WaitingElement in = (WaitingElement) o;
52 if (waitingID == in.getWaitingID() && status == in.getStatus()
53 && allocList.equals(in.getAllocList())) {
61 public String toString() {
62 return "[waitingID=" + waitingID + " status=" + status + " allocList="
66 public int hashCode() {
70 hash = hash * 31 + waitingID;
74 for (Iterator iterator = allocList.iterator(); iterator.hasNext();) {
75 Integer type = (Integer) iterator.next();
76 hash += type.intValue();