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 void
addEdge(Edge edge)
Adds a directed edge to the graph.Edge
buildEdge(Node nodeA, Node nodeB)
Builds a directed edge.protected Graph
buildGraph()
Creates a directed graph object.Node
buildNode()
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:
buildNode
in interfaceGraphBuilder
- Overrides:
buildNode
in 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:
buildEdge
in interfaceGraphBuilder
- Overrides:
buildEdge
in 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:
addEdge
in interfaceGraphBuilder
- Overrides:
addEdge
in 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:
buildGraph
in classBasicGraphBuilder
- Returns:
- A Graph object.
-
-