public static <N> ImmutableGraph<N> copyOf(Graph<N> graph) {
    return (graph instanceof ImmutableGraph)
        ? (ImmutableGraph<N>) graph
        : new ImmutableGraph<N>(
            new ConfigurableValueGraph<N, Presence>(
                GraphBuilder.from(graph), getNodeConnections(graph), graph.edges().size()));
  }
public static <N> ImmutableGraph<N> copyOf(Graph<N> graph) {
    return (graph instanceof ImmutableGraph)
        ? (ImmutableGraph<N>) graph
        : new ImmutableGraph<N>(
            new ConfigurableValueGraph<N, Presence>(
                GraphBuilder.from(graph), getNodeConnections(graph), graph.edges().size()));
  }
public static < N > ImmutableGraph < N > copyOf ( Graph < N > graph ) { return ( graph instanceof ImmutableGraph ) ? ( ImmutableGraph < N > ) graph : new ImmutableGraph < N > ( new ConfigurableValueGraph < N , Presence > ( GraphBuilder . from ( graph ) , getNodeConnections ( graph ) , graph . edges ( ) . size ( ) ) ) ; }
Returns an immutable copy of {@code graph}.
Returns an immutable copy of {