ProjektGraph/graph/MarkedVertex.java

44 lines
639 B
Java
Raw Normal View History

2024-06-15 14:48:28 +00:00
package graph;
public class MarkedVertex<T extends VertexMarking> extends Vertex{
// ATTRIBUTE
2024-06-15 14:48:28 +00:00
private T marking;
// KONSTRUKTOREN
2024-06-15 14:48:28 +00:00
public MarkedVertex() {
super();
}
2024-07-01 15:08:11 +00:00
public MarkedVertex(String s, T t, int x, int y) {
2024-06-15 14:48:28 +00:00
super(s);
this.marking = t;
2024-07-01 15:08:11 +00:00
this.setXCoordinate(x);
this.setYCoordinate(y);
2024-06-15 14:48:28 +00:00
}
// GET-ER
2024-06-15 14:48:28 +00:00
public T getMarking() {
return this.marking;
}
// SET-ER
2024-06-15 14:48:28 +00:00
public void setMarking(T t) {
this.marking = t;
}
// Ausgabe
2024-06-15 14:48:28 +00:00
public String toString() {
return "MarkedVertex " + this.getName();
2024-06-15 14:48:28 +00:00
}
}