ProjektGraph/graph/MarkedVertex.java

44 lines
667 B
Java

package graph;
import java.awt.*;
public class MarkedVertex<T extends VertexMarking> extends Vertex{
// ATTRIBUTE
private T marking;
// KONSTRUKTOREN
public MarkedVertex() {
super();
}
public MarkedVertex(int xCoordinate, int yCoordinate, String name, Color color, T t) {
super(xCoordinate, yCoordinate, name, color);
this.marking = t;
}
// 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();
}
}