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, toString
public BasicDirectedEdge(DirectedNode in, DirectedNode out)
in
- The in node of the edge.out
- The out node of the edge.public DirectedNode getInNode()
DirectedEdge
getInNode
in interface DirectedEdge
DirectedEdge.getInNode()
public DirectedNode getOutNode()
DirectedEdge
getOutNode
in interface DirectedEdge
DirectedEdge.getOutNode()
public Node getNodeA()
getNodeA
in interface Edge
Edge.getNodeA()
public Node getNodeB()
getNodeB
in interface Edge
Edge.getNodeB()
public Node getOtherNode(Node node)
Edge
getOtherNode
in interface Edge
node
- The node opposite of the node to return.Edge.getOtherNode(Node)
public void reverse()
reverse
in interface Edge
Edge.reverse()
public Iterator getRelated()
getRelated
in interface Graphable
Graphable.getRelated()
public Iterator getInRelated()
getInRelated
in interface DirectedGraphable
DirectedGraphable.getInRelated()
public Iterator getOutRelated()
getOutRelated
in interface DirectedGraphable
DirectedGraphable.getOutRelated()
public int compareNodes(Edge other)
Edge
compareNodes
in interface Edge
Edge.compareNodes(Edge)
Copyright © 1996–2019 Geotools. All rights reserved.