@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(this); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(this); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(this); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable }
/** Returns an immutable copy of {@code graph}. */ 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}. */ 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}. */ 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())); }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(this); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(this); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable }
@Override public ImmutableGraph<N> asGraph() { return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable }
/** Returns an immutable copy of {@code graph}. */ 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}. */ 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())); }