Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for buildOrThrow (0.07 sec)

  1. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testEmptyBuilder() {
        ImmutableMap<String, Integer> map = new Builder<String, Integer>().buildOrThrow();
        assertEquals(Collections.<String, Integer>emptyMap(), map);
      }
    
      public void testSingletonBuilder() {
        ImmutableMap<String, Integer> map = new Builder<String, Integer>().put("one", 1).buildOrThrow();
        assertMapEquals(map, "one", 1);
      }
    
      public void testBuilder() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testEmptyBuilder() {
        ImmutableMap<String, Integer> map = new Builder<String, Integer>().buildOrThrow();
        assertEquals(Collections.<String, Integer>emptyMap(), map);
      }
    
      public void testSingletonBuilder() {
        ImmutableMap<String, Integer> map = new Builder<String, Integer>().put("one", 1).buildOrThrow();
        assertMapEquals(map, "one", 1);
      }
    
      public void testBuilder() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableBiMapFloodingTest.java

            builder.putAll(sourceMap);
            return builder.buildOrThrow();
          }
        },
        BUILDER_PUT_ALL_ENTRIES {
          @Override
          public ImmutableBiMap<Object, Object> create(List<Entry<?, ?>> entries) {
            return ImmutableBiMap.builder().putAll(entries).buildOrThrow();
          }
        },
        FORCE_JDK {
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

          for (Entry<String, String> entry : entries) {
            checkNotNull(entry);
            builder.put(entry.getKey(), entry.getValue());
          }
          return builder.buildOrThrow();
        }
      }
    
      public static class ImmutableMapCopyOfGenerator extends TestStringMapGenerator {
        @Override
        protected Map<String, String> create(Entry<String, String>[] entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableBiMap.java

        }
    
        @Override
        public ImmutableBiMap<K, V> build() {
          return buildOrThrow();
        }
    
        @Override
        public ImmutableBiMap<K, V> buildOrThrow() {
          ImmutableMap<K, V> map = super.buildOrThrow();
          if (map.isEmpty()) {
            return of();
          }
          return new RegularImmutableBiMap<K, V>(super.buildOrThrow());
        }
    
        @Override
        ImmutableBiMap<K, V> buildJdkBacked() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableMap.java

       * Builder.buildKeepingLast(). The same Builder might be called with buildKeepingLast() and then
       * buildOrThrow(), or vice versa. So in particular, if we modify alternatingKeysAndValues to
       * eliminate duplicate keys (for buildKeepingLast()) then we have to ensure that a later call to
       * buildOrThrow() will still throw as if the duplicates had not been eliminated. And the exception
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableMap.java

        @Nullable Object[] alternatingKeysAndValues;
        int size;
        boolean entriesUsed;
        /**
         * If non-null, a duplicate key we found in a previous buildKeepingLast() or buildOrThrow()
         * call. A later buildOrThrow() can simply report this duplicate immediately.
         */
        @Nullable DuplicateKey duplicateKey;
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/SparseImmutableTable.java

        }
        this.rowMap = rowBuilder.buildOrThrow();
    
        ImmutableMap.Builder<C, ImmutableMap<R, V>> columnBuilder =
            new ImmutableMap.Builder<>(columns.size());
        for (Entry<C, Map<R, V>> col : columns.entrySet()) {
          columnBuilder.put(col.getKey(), ImmutableMap.copyOf(col.getValue()));
        }
        this.columnMap = columnBuilder.buildOrThrow();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableTable.java

         *
         * <p>Prefer the equivalent method {@link #buildOrThrow()} to make it explicit that the method
         * will throw an exception if there are duplicate key pairs. The {@code build()} method will
         * soon be deprecated.
         *
         * @throws IllegalArgumentException if duplicate key pairs were added
         */
        public ImmutableTable<R, C, V> build() {
          return buildOrThrow();
        }
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableMap.java

         *
         * <p>Prefer the equivalent method {@link #buildOrThrow()} to make it explicit that the method
         * will throw an exception if there are duplicate keys. The {@code build()} method will soon be
         * deprecated.
         *
         * @throws IllegalArgumentException if duplicate keys were added
         */
        public ImmutableMap<K, V> build() {
          return buildOrThrow();
        }
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
Back to top