public class DirectedEdge
extends java.lang.Object
Constructor and Description |
---|
DirectedEdge(Edge edge,
boolean forward)
Construct a directed edge.
|
DirectedEdge(Edge edge,
Node start)
Construct a directed edge.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Edge |
getEdge()
Get the underlying edge.
|
Point2D |
getEndCoordinates()
Get the coordinates of the end of this edge.
|
Node |
getEndNode()
Get the node at the end of the underlying edge.
|
Line2D |
getLine()
Get the line represented by this edge.
|
Point2D |
getStartCoordinates()
Get the coordinates of the start of this edge.
|
Node |
getStartNode()
Get the node at the start of the underlying edge.
|
int |
hashCode() |
boolean |
isForward()
Is this directed edge in the direction of the underlying edge?
|
java.lang.String |
toString() |
public DirectedEdge(Edge edge, boolean forward)
edge
- The underlying edge.forward
- True if this directed edge is aligned with the underlying edge direction, false otherwise.public Edge getEdge()
public Line2D getLine()
public boolean isForward()
public Node getStartNode()
public Node getEndNode()
public Point2D getStartCoordinates()
public Point2D getEndCoordinates()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object