|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.planargraph.GraphComponent
com.vividsolutions.jts.planargraph.Edge
Represents an undirected edge of a PlanarGraph
. An undirected edge
in fact simply acts as a central point of reference for two opposite
DirectedEdge
s.
Usually a client using a PlanarGraph
will subclass Edge
to add its own application-specific data and methods.
Field Summary | |
protected DirectedEdge[] |
dirEdge
The two DirectedEdges associated with this Edge |
Fields inherited from class com.vividsolutions.jts.planargraph.GraphComponent |
isMarked, isVisited |
Constructor Summary | |
Edge()
Constructs an Edge whose DirectedEdges are not yet set. |
|
Edge(DirectedEdge de0,
DirectedEdge de1)
Constructs an Edge initialized with the given DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node. |
Method Summary | |
DirectedEdge |
getDirEdge(int i)
Returns one of the DirectedEdges associated with this Edge. |
DirectedEdge |
getDirEdge(Node fromNode)
Returns the DirectedEdge that starts from the given node, or null if the
node is not one of the two nodes associated with this Edge. |
Node |
getOppositeNode(Node node)
If node is one of the two nodes associated with this Edge,
returns the other node; otherwise returns null. |
void |
setDirectedEdges(DirectedEdge de0,
DirectedEdge de1)
Initializes this Edge's two DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node. |
Methods inherited from class com.vividsolutions.jts.planargraph.GraphComponent |
isMarked, isVisited, setMarked, setVisited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DirectedEdge[] dirEdge
Constructor Detail |
public Edge()
setDirectedEdges(DirectedEdge, DirectedEdge)
public Edge(DirectedEdge de0, DirectedEdge de1)
Method Detail |
public void setDirectedEdges(DirectedEdge de0, DirectedEdge de1)
public DirectedEdge getDirEdge(int i)
i
- 0 or 1public DirectedEdge getDirEdge(Node fromNode)
DirectedEdge
that starts from the given node, or null if the
node is not one of the two nodes associated with this Edge.
public Node getOppositeNode(Node node)
node
is one of the two nodes associated with this Edge,
returns the other node; otherwise returns null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |