Programmieren_Projekt/graph/MarkedEdge.java

35 lines
964 B
Java

package graph;
public class MarkedEdge<U extends EdgeMarking> extends Edge {
private U marking;
public MarkedEdge() {
super();
this.screenEdge = new visualizationElements.Edge(null, null);
}
private visualizationElements.Edge screenEdge;
public MarkedEdge(String s, Vertex n1, Vertex n2, U u) {
super(s, n1, n2);
this.marking = u;
this.screenEdge = new visualizationElements.Edge(n1.getScreenVertex(), n2.getScreenVertex(), "u.toString()");
}
public U getMarking() {
return marking;
}
public void setMarking(U u) {
this.marking = u;
}
public visualizationElements.Edge getScreenEdge() {return this.screenEdge;}
@Override
public String toString() {
return "MarkedEdge{" + "name='" + getName() + '\'' + ", source=" + getSource() + ", destination=" + getDestination() + ", marking=" + marking + '}';
}
}