(final Graph<N> graph)
| 446 | |
| 447 | |
| 448 | private static <N> Map<N, Set<N>> nodeToAdjacentNodes(final Graph<N> graph) { |
| 449 | checkNotNull(graph, "graph"); |
| 450 | return Maps.asMap( |
| 451 | graph.nodes(), |
| 452 | new Function<N, Set<N>>() { |
| 453 | @Override |
| 454 | public Set<N> apply(N node) { |
| 455 | return graph.adjacentNodes(node); |
| 456 | } |
| 457 | }); |
| 458 | } |
| 459 | |
| 460 | /** |
| 461 | * Returns a function that transforms an edge into a string representation of its incident nodes |
no test coverage detected