44 lines
639 B
Java
44 lines
639 B
Java
package graph;
|
|
|
|
public class MarkedVertex<T extends VertexMarking> extends Vertex{
|
|
|
|
// ATTRIBUTE
|
|
|
|
private T marking;
|
|
|
|
|
|
// KONSTRUKTOREN
|
|
|
|
public MarkedVertex() {
|
|
super();
|
|
}
|
|
|
|
|
|
public MarkedVertex(String s, T t, int x, int y) {
|
|
super(s);
|
|
this.marking = t;
|
|
this.setXCoordinate(x);
|
|
this.setYCoordinate(y);
|
|
}
|
|
|
|
|
|
// GET-ER
|
|
|
|
public T getMarking() {
|
|
return this.marking;
|
|
}
|
|
|
|
|
|
// SET-ER
|
|
|
|
public void setMarking(T t) {
|
|
this.marking = t;
|
|
}
|
|
|
|
|
|
// Ausgabe
|
|
public String toString() {
|
|
return "MarkedVertex " + this.getName();
|
|
}
|
|
}
|