public void flip() { Task tmp = v; this.w.addEdge(this); this.v.removeEdge(this); this.v = w; this.w = tmp; w.addPredecessor(); v.removePredecessor(); }
Edge(Task v, Task w) { this.v = v; this.w = w; w.addPredecessor(); }