Returns a GraphBuilder initialized with all properties queryable from graph. The "queryable" properties are those that are exposed through the Graph interface, such as Graph#isDirected(). Other properties, such as #expectedNodeCount(int), are not set in th
(Graph<N> graph)
| 77 | * are not set in the new builder. |
| 78 | */ |
| 79 | public static <N> GraphBuilder<N> from(Graph<N> graph) { |
| 80 | // TODO(b/28087289): add allowsParallelEdges() once we support them |
| 81 | return new GraphBuilder<N>(graph.isDirected()) |
| 82 | .allowsSelfLoops(graph.allowsSelfLoops()); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Specifies whether the graph will allow self-loops (edges that connect a node to itself). |
no test coverage detected