MCPcopy Index your code
hub / github.com/antlr/codebuff / from

Method from

corpus/java/training/guava/graph/NetworkBuilder.java:83–87  ·  view source on GitHub ↗

Returns a NetworkBuilder initialized with all properties queryable from graph. The "queryable" properties are those that are exposed through the Network interface, such as Network#isDirected(). Other properties, such as #expectedNodeCount(int), are not set

(Network<N, E> graph)

Source from the content-addressed store, hash-verified

81 * {@link #expectedNodeCount(int)}, are not set in the new builder.
82 */
83 public static <N, E> NetworkBuilder<N, E> from(Network<N, E> graph) {
84 return new NetworkBuilder<N, E>(graph.isDirected())
85 .allowsParallelEdges(graph.allowsParallelEdges())
86 .allowsSelfLoops(graph.allowsSelfLoops());
87 }
88
89 /**
90 * Specifies whether the graph will allow parallel edges. Attempting to add a parallel edge to

Callers 2

ImmutableNetworkMethod · 0.95
copyOfMethod · 0.95

Calls 3

allowsSelfLoopsMethod · 0.65
allowsParallelEdgesMethod · 0.65
isDirectedMethod · 0.65

Tested by

no test coverage detected