Interface DirectedEdge
- All Known Implementing Classes:
DirectedEdgeImpl1
public interface DirectedEdge
Each edge has exactly one Source Vertex and one Target Vertex.
- Since:
- 06-Sep-2021 15:59:45
- Version:
- 1.0
- Author:
- David
-
Method Summary
Modifier and Type Method Description Vertex
getSourceVertex()
Returns the Vertex from which the Edge starts.Vertex
getTargetVertex()
Returns the Vertex at which the Edge ends.String
getType()
Returns the type associated with the Edge.void
setSourceVertex(Vertex ver)
Set the source Vertex for this Edge.void
setTargetVertex(Vertex ver)
Set the target Vertex for this Edge.void
setType(String type)
Set the type associated with this Edge.
-
Method Details
-
getSourceVertex
Vertex getSourceVertex()Returns the Vertex from which the Edge starts.- Returns:
- sourceVertex The originating end of the Edge i.e. the Edge goes from the source to the target.
-
setSourceVertex
Set the source Vertex for this Edge.- Parameters:
ver
- The source Vertex for this edge.
-
getTargetVertex
Vertex getTargetVertex()Returns the Vertex at which the Edge ends.- Returns:
- tergetVertex The target end of the Edge i.e. the Edge goes from the source to the target.
-
setTargetVertex
Set the target Vertex for this Edge.- Parameters:
ver
- The target Vertex for this edge.
-
getType
String getType()Returns the type associated with the Edge.- Returns:
- String The type of association the Edge represents.
-
setType
Set the type associated with this Edge.- Parameters:
type
- The type for this Edge.
-