Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for MutableValueGraph (0.11 sec)

  1. guava/src/com/google/common/graph/MutableValueGraph.java

     *
     * @author James Sexton
     * @param <N> Node parameter type
     * @param <V> Value parameter type
     * @since 20.0
     */
    @Beta
    @ElementTypesAreNonnullByDefault
    public interface MutableValueGraph<N, V> extends ValueGraph<N, V> {
    
      /**
       * Adds {@code node} if it is not already present.
       *
       * <p><b>Nodes must be unique</b>, just as {@code Map} keys must be. They must also be non-null.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

    @RunWith(JUnit4.class)
    public class ImmutableValueGraphTest {
    
      @Test
      public void immutableValueGraph() {
        MutableValueGraph<String, Integer> mutableValueGraph = ValueGraphBuilder.directed().build();
        mutableValueGraph.addNode("A");
        ImmutableValueGraph<String, Integer> immutableValueGraph =
            ImmutableValueGraph.copyOf(mutableValueGraph);
    
        assertThat(immutableValueGraph.asGraph()).isInstanceOf(ImmutableGraph.class);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

    @RunWith(JUnit4.class)
    public class ImmutableValueGraphTest {
    
      @Test
      public void immutableValueGraph() {
        MutableValueGraph<String, Integer> mutableValueGraph = ValueGraphBuilder.directed().build();
        mutableValueGraph.addNode("A");
        ImmutableValueGraph<String, Integer> immutableValueGraph =
            ImmutableValueGraph.copyOf(mutableValueGraph);
    
        assertThat(immutableValueGraph.asGraph()).isInstanceOf(ImmutableGraph.class);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/ValueGraphBuilder.java

        newBuilder.incidentEdgeOrder = checkNotNull(incidentEdgeOrder);
        return newBuilder;
      }
      /**
       * Returns an empty {@link MutableValueGraph} with the properties of this {@link
       * ValueGraphBuilder}.
       */
      public <N1 extends N, V1 extends V> MutableValueGraph<N1, V1> build() {
        return new StandardMutableValueGraph<>(this);
      }
    
      ValueGraphBuilder<N, V> copy() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 03 01:21:31 UTC 2022
    - 8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/graph/ImmutableValueGraph.java

       */
      public static class Builder<N, V> {
    
        private final MutableValueGraph<N, V> mutableValueGraph;
    
        Builder(ValueGraphBuilder<N, V> graphBuilder) {
          // The incidentEdgeOrder for immutable graphs is always stable. However, we don't want to
          // modify this builder, so we make a copy instead.
          this.mutableValueGraph =
              graphBuilder.copy().incidentEdgeOrder(ElementOrder.<N>stable()).build();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/ImmutableValueGraph.java

       */
      public static class Builder<N, V> {
    
        private final MutableValueGraph<N, V> mutableValueGraph;
    
        Builder(ValueGraphBuilder<N, V> graphBuilder) {
          // The incidentEdgeOrder for immutable graphs is always stable. However, we don't want to
          // modify this builder, so we make a copy instead.
          this.mutableValueGraph =
              graphBuilder.copy().incidentEdgeOrder(ElementOrder.<N>stable()).build();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  7. guava/src/com/google/common/graph/StandardMutableGraph.java

     *
     * @author James Sexton
     * @param <N> Node parameter type
     */
    @ElementTypesAreNonnullByDefault
    final class StandardMutableGraph<N> extends ForwardingGraph<N> implements MutableGraph<N> {
      private final MutableValueGraph<N, Presence> backingValueGraph;
    
      /** Constructs a {@link MutableGraph} with the properties specified in {@code builder}. */
      StandardMutableGraph(AbstractGraphBuilder<? super N> builder) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

        mutableGraph.addNode("A");
        ImmutableGraph<String> immutableGraph = ImmutableGraph.copyOf(mutableGraph);
    
        assertThat(immutableGraph).isNotInstanceOf(MutableValueGraph.class);
        assertThat(immutableGraph).isEqualTo(mutableGraph);
    
        mutableGraph.addNode("B");
        assertThat(immutableGraph).isNotEqualTo(mutableGraph);
      }
    
      @Test
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

        mutableGraph.addNode("A");
        ImmutableGraph<String> immutableGraph = ImmutableGraph.copyOf(mutableGraph);
    
        assertThat(immutableGraph).isNotInstanceOf(MutableValueGraph.class);
        assertThat(immutableGraph).isEqualTo(mutableGraph);
    
        mutableGraph.addNode("B");
        assertThat(immutableGraph).isNotEqualTo(mutableGraph);
      }
    
      @Test
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
Back to top