Class Edge
java.lang.Object
org.opentcs.components.kernel.routing.Edge
public class Edge
extends java.lang.Object
A wrapper for
Paths that can be used to build routing graphs.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description PathgetPath()Returns the path in the model that is traversed on this edge.java.lang.StringgetSourceVertex()Returns the source vertex of this edge.java.lang.StringgetTargetVertex()Returns the target vertex of this edge.booleanisTravellingReverse()Indicates whether the path is travelled in reverse direction.java.lang.StringtoString()
-
Constructor Details
-
Edge
Creates a new instance.- Parameters:
modelPath- The path in the model that is traversed on this edge.travellingReverse- Whether the path is travelled in reverse direction.
-
-
Method Details
-
getPath
Returns the path in the model that is traversed on this edge.- Returns:
- The path in the model that is traversed on this edge.
-
isTravellingReverse
public boolean isTravellingReverse()Indicates whether the path is travelled in reverse direction.- Returns:
- Whether the path is travelled in reverse direction.
-
getSourceVertex
public java.lang.String getSourceVertex()Returns the source vertex of this edge.- Returns:
- The source vertex of this edge.
-
getTargetVertex
public java.lang.String getTargetVertex()Returns the target vertex of this edge.- Returns:
- The target vertex of this edge.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-