Package graph
Klasse Edge
java.lang.Object
graph.Edge
- Bekannte direkte Unterklassen:
MarkedEdge
Abstract class representing an edge in a graph.
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungRetrieves the destination vertex of the edge.getName()
Retrieves the name of the edge.abstract Edge
Abstract method to retrieve the screen representation of the edge for visualization.Retrieves the source vertex of the edge.void
Sets the destination vertex of the edge.void
Sets the name of the edge.void
Sets the source vertex of the edge.
-
Felddetails
-
name
The name of the edge. -
source
The source vertex of the edge. -
destination
The destination vertex of the edge.
-
-
Konstruktordetails
-
Edge
public Edge()Default constructor initializes the edge with empty name and null source and destination vertices. -
Edge
Constructor initializes the edge with a specified name, source, and destination vertices.- Parameter:
s
- The name of the edge.n1
- The source vertex of the edge.n2
- The destination vertex of the edge.
-
-
Methodendetails
-
getName
Retrieves the name of the edge.- Gibt zurück:
- The name of the edge.
-
getSource
Retrieves the source vertex of the edge.- Gibt zurück:
- The source vertex of the edge.
-
getDestination
Retrieves the destination vertex of the edge.- Gibt zurück:
- The destination vertex of the edge.
-
getScreenEdge
Abstract method to retrieve the screen representation of the edge for visualization.- Gibt zurück:
- The visualizationElements.Edge representing the screen edge.
-
setName
Sets the name of the edge.- Parameter:
s
- The name to set for the edge.
-
setSource
Sets the source vertex of the edge.- Parameter:
n
- The source vertex to set for the edge.
-
setDestination
Sets the destination vertex of the edge.- Parameter:
n
- The destination vertex to set for the edge.
-