package MaxFlowApplet.graph; public class FlowEdge extends Edge { public int getResidualCapacity() { return capacity - flow; }; // returns the vertex from whome the edge is directed public FlowVertex fromVertex() { return (FlowVertex) from; } // returns the vertex to whome the edge is directed public FlowVertex toVertex() { return (FlowVertex) from; }; public int getCapacity() { return capacity; }; public void setCapacity(int newCapacity) { capacity = newCapacity; }; public int getFlow() { return flow; }; public void setFlow(int newFlow) { flow = newFlow; }; protected int capacity; protected int flow; };