Returns a {@link GraphBuilder} initialized with all properties queryable from {@code graph}. <p>The "queryable" properties are those that are exposed through the {@link Graph} interface, such as {@link Graph#isDirected()}. Other properties, such as {@link #expectedNodeCount(int)}, are not set in th
(Graph<N> graph)
| 93 | * are not set in the new builder. |
| 94 | */ |
| 95 | public static <N> GraphBuilder<N> from(Graph<N> graph) { |
| 96 | return new GraphBuilder<N>(graph.isDirected()) |
| 97 | .allowsSelfLoops(graph.allowsSelfLoops()) |
| 98 | .nodeOrder(graph.nodeOrder()) |
| 99 | .incidentEdgeOrder(graph.incidentEdgeOrder()); |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Returns an {@link ImmutableGraph.Builder} with the properties of this {@link GraphBuilder}. |