Package org.jgrapht.graph.builder
Class UndirectedGraphBuilder<V,E,G extends UndirectedGraph<V,E>>
- java.lang.Object
-
- org.jgrapht.graph.builder.AbstractGraphBuilder<V,E,G,B>
-
- org.jgrapht.graph.builder.UndirectedGraphBuilderBase<V,E,G,UndirectedGraphBuilder<V,E,G>>
-
- org.jgrapht.graph.builder.UndirectedGraphBuilder<V,E,G>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge typeG- type of the resulting graph
public final class UndirectedGraphBuilder<V,E,G extends UndirectedGraph<V,E>> extends UndirectedGraphBuilderBase<V,E,G,UndirectedGraphBuilder<V,E,G>>
A builder class forGraph. If you want to extend this class, seeUndirectedGraphBuilderBase.
-
-
Field Summary
-
Fields inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder
graph
-
-
Constructor Summary
Constructors Constructor Description UndirectedGraphBuilder(G baseGraph)Creates a builder based onbaseGraph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UndirectedGraphBuilder<V,E,G>self()-
Methods inherited from class org.jgrapht.graph.builder.UndirectedGraphBuilderBase
buildUnmodifiable
-
Methods inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder
addEdge, addEdge, addEdgeChain, addGraph, addVertex, addVertices, build, removeEdge, removeEdge, removeVertex, removeVertices
-
-
-
-
Constructor Detail
-
UndirectedGraphBuilder
public UndirectedGraphBuilder(G baseGraph)
Creates a builder based onbaseGraph.baseGraphmust be mutable.The recommended way to use this constructor is:
new UndirectedGraphBuilder<...>(new YourGraph<...>(...)).NOTE:
baseGraphshould not be an existing graph. If you want to add an existing graph to the graph being built, you should use theAbstractGraphBuilder.addVertex(Object)method.- Parameters:
baseGraph- the graph object to base building on
-
-
Method Detail
-
self
protected UndirectedGraphBuilder<V,E,G> self()
- Specified by:
selfin classAbstractGraphBuilder<V,E,G extends UndirectedGraph<V,E>,UndirectedGraphBuilder<V,E,G extends UndirectedGraph<V,E>>>- Returns:
- the
thisobject.
-
-