public class BasicEdge extends BasicGraphable implements Edge
EQUAL_NODE_ORIENTATION, OPPOSITE_NODE_ORIENTATION, UNEQUAL_NODE_ORIENTATION| Constructor and Description |
|---|
BasicEdge(Node nodeA,
Node nodeB)
Constructs a new edge.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareNodes(Edge other)
Compares the node orientation of the edge with another edge.
|
Node |
getNodeA()
Returns the A node of the edge.
|
Node |
getNodeB()
Returns the B node of the edge.
|
Node |
getOtherNode(Node node)
Returns null if the specified node is neither the A node or the B node.
|
Iterator<Edge> |
getRelated()
Returns all edges that are adjacent to both the A and B nodes.
|
void |
reverse()
Reverses the node orientation of the edge.
|
String |
toString()
Returns ([A node.toString()],[B node.toString()]).
|
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisitedpublic Node getNodeA()
EdgegetNodeA in interface EdgeEdge.getNodeA()public Node getNodeB()
EdgegetNodeB in interface EdgeEdge.getNodeB()public Node getOtherNode(Node node)
getOtherNode in interface Edgenode - The node opposite of the node to return.Edge.getOtherNode(Node)public Iterator<Edge> getRelated()
getRelated in interface GraphableGraphable.getRelated()public void reverse()
Edgereverse in interface EdgeEdge.reverse()public int compareNodes(Edge other)
EdgecompareNodes in interface EdgeEdge.compareNodes(Edge)public String toString()
toString in class BasicGraphableGraphable.getID()Copyright © 1996–2021 Geotools. All rights reserved.