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)
| 86 | |
| 87 | |
| 88 | public static <N> GraphBuilder<N> from(Graph<N> graph) { |
| 89 | // TODO(b/28087289): add allowsParallelEdges() once we support them |
| 90 | return new GraphBuilder<N>(graph.isDirected()).allowsSelfLoops(graph.allowsSelfLoops()); |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Specifies whether the graph will allow self-loops (edges that connect a node to itself). |
no test coverage detected