org.jgrapht.graph.builder

## Class DirectedWeightedGraphBuilder<V,E,G extends DirectedGraph<V,E> & WeightedGraph<V,E>>

- java.lang.Object
- - org.jgrapht.graph.builder.AbstractGraphBuilder<V,E,G,B>
  - - org.jgrapht.graph.builder.DirectedGraphBuilderBase<V,E,G,B>
    - - org.jgrapht.graph.builder.DirectedWeightedGraphBuilderBase<V,E,G,DirectedWeightedGraphBuilder<V,E,G>>
      - - org.jgrapht.graph.builder.DirectedWeightedGraphBuilder<V,E,G>

-     public final class DirectedWeightedGraphBuilder<V,E,G extends DirectedGraph<V,E> & WeightedGraph<V,E>>
      extends DirectedWeightedGraphBuilderBase<V,E,G,DirectedWeightedGraphBuilder<V,E,G>>

  A builder class for directed weighted graphs}. If you want to extend this class, see `DirectedWeightedGraphBuilderBase`.

- - ### Field Summary

    - ### Fields inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder

      `graph`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectedWeightedGraphBuilder(G baseGraph)` Creates a builder based on `baseGraph`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected DirectedWeightedGraphBuilder<V,E,G>` | `self()`

    - ### Methods inherited from class org.jgrapht.graph.builder.DirectedWeightedGraphBuilderBase

      `addEdge`

    - ### Methods inherited from class org.jgrapht.graph.builder.DirectedGraphBuilderBase

      `buildUnmodifiable`

    - ### Methods inherited from class org.jgrapht.graph.builder.AbstractGraphBuilder

      `addEdge, addEdgeChain, addGraph, addVertex, addVertices, build, removeEdge, removeVertex, removeVertices`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectedWeightedGraphBuilder

          public DirectedWeightedGraphBuilder(G baseGraph)

      Creates a builder based on `baseGraph`. `baseGraph` must be mutable.

      The recomended way to use this constructor is: `new DirectedWeightedGraphBuilder<...>(new YourGraph<...>(...))`.

      NOTE: `baseGraph` should not be an existing graph. If you want to add an existing graph to the graph being built, you should use the `AbstractGraphBuilder.addVertex(Object)` method.

      Parameters:
        `baseGraph` - the graph object to base building on

  - ### Method Detail

    - #### self

          protected DirectedWeightedGraphBuilder<V,E,G> self()

      Specified by:
        `self` in class `AbstractGraphBuilder<V,E,G extends DirectedGraph<V,E> & WeightedGraph<V,E>,DirectedWeightedGraphBuilder<V,E,G extends DirectedGraph<V,E> & WeightedGraph<V,E>>>`
      Returns:
        the `this` object.

Copyright © 2016. All rights reserved.