public class BasicDirectedEdge extends BasicGraphable implements DirectedEdge
EQUAL_NODE_ORIENTATION, OPPOSITE_NODE_ORIENTATION, UNEQUAL_NODE_ORIENTATION| Constructor and Description |
|---|
BasicDirectedEdge(DirectedNode in,
DirectedNode out)
Contstructs a new DirectedEdge.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareNodes(Edge other)
Compares the node orientation of the edge with another edge.
|
DirectedNode |
getInNode()
Returns the originating (in) node of the edge.
|
Iterator |
getInRelated()
Returns an iterator over the in edges of the in node.
|
Node |
getNodeA()
Returns the in node.
|
Node |
getNodeB()
Returns the out node.
|
Node |
getOtherNode(Node node)
Returns one of the two nodes of an edge.
|
DirectedNode |
getOutNode()
Returns the terminating (out) node of the edge.
|
Iterator |
getOutRelated()
Returns an iterator over the out edges of the out node.
|
Iterator |
getRelated()
Returns an iterator over all edges incident to both the in and out nodes.
|
void |
reverse()
Removes the edge from the out list of the in node and from the in list of the out node.
|
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited, toStringpublic BasicDirectedEdge(DirectedNode in, DirectedNode out)
in - The in node of the edge.out - The out node of the edge.public DirectedNode getInNode()
DirectedEdgegetInNode in interface DirectedEdgeDirectedEdge.getInNode()public DirectedNode getOutNode()
DirectedEdgegetOutNode in interface DirectedEdgeDirectedEdge.getOutNode()public Node getNodeA()
getNodeA in interface EdgeEdge.getNodeA()public Node getNodeB()
getNodeB in interface EdgeEdge.getNodeB()public Node getOtherNode(Node node)
EdgegetOtherNode in interface Edgenode - The node opposite of the node to return.Edge.getOtherNode(Node)public void reverse()
reverse in interface EdgeEdge.reverse()public Iterator getRelated()
getRelated in interface GraphableGraphable.getRelated()public Iterator getInRelated()
getInRelated in interface DirectedGraphableDirectedGraphable.getInRelated()public Iterator getOutRelated()
getOutRelated in interface DirectedGraphableDirectedGraphable.getOutRelated()public int compareNodes(Edge other)
EdgecompareNodes in interface EdgeEdge.compareNodes(Edge)Copyright © 1996–2019 Geotools. All rights reserved.