MCPcopy Create free account
hub / github.com/antlr/codebuff / nodeToAdjacentNodes

Method nodeToAdjacentNodes

corpus/java/training/guava/graph/Graphs.java:427–435  ·  view source on GitHub ↗
(final Graph<N> graph)

Source from the content-addressed store, hash-verified

425 }
426
427 private static <N> Map<N, Set<N>> nodeToAdjacentNodes(final Graph<N> graph) {
428 checkNotNull(graph, "graph");
429 return Maps.asMap(graph.nodes(), new Function<N, Set<N>>() {
430 @Override
431 public Set<N> apply(N node) {
432 return graph.adjacentNodes(node);
433 }
434 });
435 }
436
437 /**
438 * Returns a function that transforms an edge into a string representation of its incident nodes

Callers 1

hashCodeMethod · 0.95

Calls 3

asMapMethod · 0.95
nodesMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected