@Override public void inject(Resume a) { buffer.append(a.getHost().getName()); buffer.append(" -> "); buffer.append(a.getDestination().getName()); buffer.append(" [label=\"resume("); buffer.append(a.getVirtualMachine().getName()).append(")\""); setTimesLabel(a, buffer); buffer.append(", color=\"red\"]\n"); }
/** * Test if this action is equals to another object. * * @param o the object to compare with * @return true if ref is an instanceof Resume and if both instance involve the same virtual * machine and the same nodes */ @Override public boolean equals(Object o) { if (o == null) { return false; } else if (o == this) { return true; } else if (o.getClass() == this.getClass()) { Resume m = (Resume) o; return this.getVirtualMachine().equals(m.getVirtualMachine()) && this.getHost().equals(m.getHost()) && this.getDestination().equals(m.getDestination()); } return false; }