Package org.jgrapht.graph.builder
Class DirectedGraphBuilderBase<V,E,G extends DirectedGraph<V,E>,B extends DirectedGraphBuilderBase<V,E,G,B>>
- java.lang.Object
-
- org.jgrapht.graph.builder.AbstractGraphBuilder<V,E,G,B>
-
- org.jgrapht.graph.builder.DirectedGraphBuilderBase<V,E,G,B>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge typeG
- type of the resulting graphB
- type of this builder
- Direct Known Subclasses:
DirectedGraphBuilder
,DirectedWeightedGraphBuilderBase
public abstract class DirectedGraphBuilderBase<V,E,G extends DirectedGraph<V,E>,B extends DirectedGraphBuilderBase<V,E,G,B>> extends AbstractGraphBuilder<V,E,G,B>
Base class forDirectedGraphBuilder
for extending.
-
-
Field Summary
-
Fields inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder
graph
-
-
Constructor Summary
Constructors Constructor Description DirectedGraphBuilderBase(G baseGraph)
Creates a builder based onbaseGraph
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnmodifiableDirectedGraph<V,E>
buildUnmodifiable()
Build an unmodifiable version graph.-
Methods inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder
addEdge, addEdge, addEdgeChain, addGraph, addVertex, addVertices, build, removeEdge, removeEdge, removeVertex, removeVertices, self
-
-
-
-
Constructor Detail
-
DirectedGraphBuilderBase
public DirectedGraphBuilderBase(G baseGraph)
Creates a builder based onbaseGraph
.baseGraph
must be mutable.- Parameters:
baseGraph
- the graph object to base building on
-
-
Method Detail
-
buildUnmodifiable
public UnmodifiableDirectedGraph<V,E> buildUnmodifiable()
Build an unmodifiable version graph. Calling any method (including this method) on this builder object after calling this method is undefined behaviour.- Overrides:
buildUnmodifiable
in classAbstractGraphBuilder<V,E,G extends DirectedGraph<V,E>,B extends DirectedGraphBuilderBase<V,E,G,B>>
- Returns:
- the built unmodifiable graph.
- See Also:
AbstractGraphBuilder.build()
-
-