Package org.geotools.graph.structure.opt
Class OptDirectedEdge
Object
OptGraphable
OptDirectedEdge
- All Implemented Interfaces:
Serializable,DirectedEdge,DirectedGraphable,Edge,Graphable
Optimized implementation of DirectedEdge.
- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassIterator used to iterate over adjacent edges. -
Field Summary
Fields inherited from interface Edge
EQUAL_NODE_ORIENTATION, OPPOSITE_NODE_ORIENTATION, UNEQUAL_NODE_ORIENTATION -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new OptDirectedEdge. -
Method Summary
Modifier and TypeMethodDescriptionintcompareNodes(Edge other) Compares the node orientation of the edge with another edge.Returns the originating (in) node of the edge.Returns other components related through an in relationship.getNodeA()Returns the A node of the edge.getNodeB()Returns the B node of the edge.getOtherNode(Node node) Returns one of the two nodes of an edge.Returns the terminating (out) node of the edge.Returns other components related through an out relationship.Returns an iterator over any related components.voidreverse()Unsupported Operation.Methods inherited from class OptGraphable
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited
-
Constructor Details
-
OptDirectedEdge
Constructs a new OptDirectedEdge.- Parameters:
in- Optimized in node.out- Optimized out node.
-
-
Method Details
-
getInNode
Description copied from interface:DirectedEdgeReturns the originating (in) node of the edge.- Specified by:
getInNodein interfaceDirectedEdge- Returns:
- The directed node at the source of the edge.
- See Also:
-
getOutNode
Description copied from interface:DirectedEdgeReturns the terminating (out) node of the edge.- Specified by:
getOutNodein interfaceDirectedEdge- Returns:
- The directed node at the destination of the edge.
- See Also:
-
getNodeA
Description copied from interface:EdgeReturns the A node of the edge. -
getNodeB
Description copied from interface:EdgeReturns the B node of the edge. -
getOtherNode
Description copied from interface:EdgeReturns one of the two nodes of an edge. If the specified node is node A, then node B is returned, and vice versa.- Specified by:
getOtherNodein interfaceEdge- Parameters:
node- The node opposite of the node to return.- Returns:
- Node A if node B is specified, node B if node A is specified.
- See Also:
-
reverse
public void reverse()Unsupported Operation. -
compareNodes
Description copied from interface:EdgeCompares the node orientation of the edge with another edge.- Specified by:
compareNodesin interfaceEdge- Returns:
- EQUAL_NODE_ORIENTATION : both nodes are equal in the correct order. UNEQUAL_NODE_ORIENTATION: both nodes are not equal OPPOSITE_NODE_ORIENTATION : both nodes are equal in opposite order.
- See Also:
-
getRelated
Description copied from interface:GraphableReturns an iterator over any related components. A graph component is related to other components of the graph of similary type through some relationship.- Specified by:
getRelatedin interfaceGraphable- Returns:
- Iterator An iterator over other components of the graph that are related to the component.
- See Also:
-
getInRelated
Description copied from interface:DirectedGraphableReturns other components related through an in relationship.- Specified by:
getInRelatedin interfaceDirectedGraphable- Returns:
- An iterator over the other directed components related through an in relationship.
- See Also:
-
getOutRelated
Description copied from interface:DirectedGraphableReturns other components related through an out relationship.- Specified by:
getOutRelatedin interfaceDirectedGraphable- Returns:
- An iterator over the other directed components related through an out relationship.
- See Also:
-