@Override public boolean allowsSelfLoops() { return delegate().allowsSelfLoops(); }
@Override public boolean allowsSelfLoops() { return delegate().allowsSelfLoops(); }
@Override public boolean allowsSelfLoops() { return delegate().allowsSelfLoops(); }
static void assertStronglyEquivalent(ValueGraph<?, ?> graphA, ValueGraph<?, ?> graphB) { // Properties not covered by equals() assertThat(graphA.allowsSelfLoops()).isEqualTo(graphB.allowsSelfLoops()); assertThat(graphA.nodeOrder()).isEqualTo(graphB.nodeOrder()); assertThat(graphA).isEqualTo(graphB); }
/** * Returns a {@link ValueGraphBuilder} initialized with all properties queryable from {@code * graph}. * * <p>The "queryable" properties are those that are exposed through the {@link ValueGraph} * interface, such as {@link ValueGraph#isDirected()}. Other properties, such as {@link * #expectedNodeCount(int)}, are not set in the new builder. */ public static <N, V> ValueGraphBuilder<N, V> from(ValueGraph<N, V> graph) { return new ValueGraphBuilder<N, V>(graph.isDirected()) .allowsSelfLoops(graph.allowsSelfLoops()) .nodeOrder(graph.nodeOrder()); }
/** * Returns a {@link ValueGraphBuilder} initialized with all properties queryable from {@code * graph}. * * <p>The "queryable" properties are those that are exposed through the {@link ValueGraph} * interface, such as {@link ValueGraph#isDirected()}. Other properties, such as {@link * #expectedNodeCount(int)}, are not set in the new builder. */ public static <N, V> ValueGraphBuilder<N, V> from(ValueGraph<N, V> graph) { return new ValueGraphBuilder<N, V>(graph.isDirected()) .allowsSelfLoops(graph.allowsSelfLoops()) .nodeOrder(graph.nodeOrder()); }
/** * Returns a {@link ValueGraphBuilder} initialized with all properties queryable from {@code * graph}. * * <p>The "queryable" properties are those that are exposed through the {@link ValueGraph} * interface, such as {@link ValueGraph#isDirected()}. Other properties, such as {@link * #expectedNodeCount(int)}, are not set in the new builder. */ public static <N, V> ValueGraphBuilder<N, V> from(ValueGraph<N, V> graph) { return new ValueGraphBuilder<N, V>(graph.isDirected()) .allowsSelfLoops(graph.allowsSelfLoops()) .nodeOrder(graph.nodeOrder()); }
@Override public boolean allowsSelfLoops() { return delegate().allowsSelfLoops(); }
@Override public boolean allowsSelfLoops() { return delegate().allowsSelfLoops(); }
checkArgument(!hierarchy.allowsSelfLoops()); this.graph = ImmutableValueGraph.copyOf(hierarchy);
static void assertStronglyEquivalent(ValueGraph<?, ?> graphA, ValueGraph<?, ?> graphB) { // Properties not covered by equals() assertThat(graphA.allowsSelfLoops()).isEqualTo(graphB.allowsSelfLoops()); assertThat(graphA.nodeOrder()).isEqualTo(graphB.nodeOrder()); assertThat(graphA).isEqualTo(graphB); }
/** * Returns a {@link ValueGraphBuilder} initialized with all properties queryable from {@code * graph}. * * <p>The "queryable" properties are those that are exposed through the {@link ValueGraph} * interface, such as {@link ValueGraph#isDirected()}. Other properties, such as {@link * #expectedNodeCount(int)}, are not set in the new builder. */ public static <N, V> ValueGraphBuilder<N, V> from(ValueGraph<N, V> graph) { return new ValueGraphBuilder<N, V>(graph.isDirected()) .allowsSelfLoops(graph.allowsSelfLoops()) .nodeOrder(graph.nodeOrder()); }
/** * Returns a {@link ValueGraphBuilder} initialized with all properties queryable from {@code * graph}. * * <p>The "queryable" properties are those that are exposed through the {@link ValueGraph} * interface, such as {@link ValueGraph#isDirected()}. Other properties, such as {@link * #expectedNodeCount(int)}, are not set in the new builder. */ public static <N, V> ValueGraphBuilder<N, V> from(ValueGraph<N, V> graph) { return new ValueGraphBuilder<N, V>(graph.isDirected()) .allowsSelfLoops(graph.allowsSelfLoops()) .nodeOrder(graph.nodeOrder()); }
@Override public GraphType getType() { return (valueGraph.isDirected() ? new DefaultGraphType.Builder().directed() : new DefaultGraphType.Builder().undirected()) .weighted(true).allowMultipleEdges(false) .allowSelfLoops(valueGraph.allowsSelfLoops()).build(); }