Package org.geotools.graph.build.basic
Class BasicDirectedGraphBuilder
- Object
-
- BasicGraphBuilder
-
- BasicDirectedGraphBuilder
-
- All Implemented Interfaces:
GraphBuilder
- Direct Known Subclasses:
BasicDirectedLineGraphBuilder,OptDirectedGraphBuilder
public class BasicDirectedGraphBuilder extends BasicGraphBuilder
An implementation of GraphBuilder used to build directed graphs.- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
- See Also:
DirectedGraph
-
-
Constructor Summary
Constructors Constructor Description BasicDirectedGraphBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(Edge edge)Adds a directed edge to the graph.EdgebuildEdge(Node nodeA, Node nodeB)Builds a directed edge.protected GraphbuildGraph()Creates a directed graph object.NodebuildNode()Builds a directed node.-
Methods inherited from class BasicGraphBuilder
addNode, clone, getEdges, getGraph, getNodes, importGraph, removeEdge, removeEdges, removeNode, removeNodes
-
-
-
-
Method Detail
-
buildNode
public Node buildNode()
Builds a directed node.- Specified by:
buildNodein interfaceGraphBuilder- Overrides:
buildNodein classBasicGraphBuilder- Returns:
- Node The newly built node.
- See Also:
DirectedNode,GraphBuilder.buildNode()
-
buildEdge
public Edge buildEdge(Node nodeA, Node nodeB)
Builds a directed edge.- Specified by:
buildEdgein interfaceGraphBuilder- Overrides:
buildEdgein classBasicGraphBuilder- Parameters:
nodeA- Adjacent node to edge.nodeB- Adjacent node to edge.- Returns:
- Edge the newly built Edge.
- See Also:
DirectedEdge,GraphBuilder#buildEdge()
-
addEdge
public void addEdge(Edge edge)
Adds a directed edge to the graph.- Specified by:
addEdgein interfaceGraphBuilder- Overrides:
addEdgein classBasicGraphBuilder- Parameters:
edge- Edge to be added to graph.- See Also:
DirectedEdge,GraphBuilder.addEdge(Edge)
-
buildGraph
protected Graph buildGraph()
Creates a directed graph object.- Overrides:
buildGraphin classBasicGraphBuilder- Returns:
- A Graph object.
-
-