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 |
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, setVisited
public Node getNodeA()
Edge
getNodeA
in interface Edge
Edge.getNodeA()
public Node getNodeB()
Edge
getNodeB
in interface Edge
Edge.getNodeB()
public Node getOtherNode(Node node)
getOtherNode
in interface Edge
node
- The node opposite of the node to return.Edge.getOtherNode(Node)
public Iterator getRelated()
getRelated
in interface Graphable
Graphable.getRelated()
public void reverse()
Edge
reverse
in interface Edge
Edge.reverse()
public int compareNodes(Edge other)
Edge
compareNodes
in interface Edge
Edge.compareNodes(Edge)
public String toString()
toString
in class BasicGraphable
Graphable.getID()
Copyright © 1996–2019 Geotools. All rights reserved.