ProjektGraph/graph/Edge.java

64 lines
948 B
Java
Raw Permalink Normal View History

2024-06-15 14:48:28 +00:00
package graph;
public abstract class Edge {
// ATTRIBUTE
2024-06-15 14:48:28 +00:00
private String name;
private Vertex source;
private Vertex destination;
// KONSTRUKTOREN
2024-06-15 14:48:28 +00:00
public Edge() {
this.name = "";
this.source = null;
this.destination = null;
}
public Edge(String s, Vertex n1, Vertex n2) {
this.name = s;
this.source = n1;
this.destination = n2;
}
// GET-ER
2024-06-15 14:48:28 +00:00
public String getName() {
return this.name;
}
public Vertex getSource() {
return this.source;
}
public Vertex getDestination() {
return this.destination;
}
2024-07-02 22:46:21 +00:00
public abstract visualizationElements.Edge getScreenEdge();
// SET-ER
2024-06-15 14:48:28 +00:00
public void setName(String s) {
this.name = s;
}
public void setSource(Vertex n) {
this.source = n;
}
public void setDestination(Vertex n) {
this.destination = n;
}
}