Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 29 for buildOrThrow (0.37 seconds)

  1. 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;
    
        /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 02 19:58:40 GMT 2026
    - 41.2K bytes
    - Click Count (0)
  2. 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();
        }
    
        /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 44.7K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/net/HttpHeadersTest.java

                .put("SEC_WEBSOCKET_VERSION", "Sec-WebSocket-Version")
                .put("X_WEBKIT_CSP", "X-WebKit-CSP")
                .put("X_WEBKIT_CSP_REPORT_ONLY", "X-WebKit-CSP-Report-Only")
                .buildOrThrow();
        ImmutableSet<String> uppercaseAcronyms =
            ImmutableSet.of(
                "CDN", "CH", "ID", "DNT", "DNS", "DPR", "ECT", "GPC", "HTTP2", "IP", "MD5", "P3P",
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:10:09 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

                    .put("one", 1)
                    .put("two", 2)
                    .put("three", 3)
                    .put("four", 4)
                    .put("five", 5)
                    .buildOrThrow());
        assertMapEquals(bimap, "one", 1, "two", 2, "three", 3, "four", 4, "five", 5);
        assertMapEquals(bimap.inverse(), 1, "one", 2, "two", 3, "three", 4, "four", 5, "five");
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  5. guava/src/com/google/common/collect/ImmutableSortedMap.java

       *         .put(1, "one")
       *         .put(2, "two")
       *         .put(3, "three")
       *         .buildOrThrow();
       * }
       *
       * <p>For <i>small</i> immutable sorted maps, the {@code ImmutableSortedMap.of()} methods are even
       * more convenient.
       *
       * <p>Builder instances can be reused - it is safe to call {@link #buildOrThrow} multiple times to
       * build multiple maps in series. Each map is a superset of the maps created before it.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 52.1K bytes
    - Click Count (0)
  6. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java

          return buildOrThrow();
        }
    
        private ImmutableMap<K, V> build(boolean throwIfDuplicateKeys) {
          if (valueComparator != null) {
            Collections.sort(entries, Ordering.from(valueComparator).onResultOf(Entry::getValue));
          }
          return fromEntryList(throwIfDuplicateKeys, entries);
        }
    
        public ImmutableMap<K, V> buildOrThrow() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 15:51:42 GMT 2026
    - 17.2K bytes
    - Click Count (0)
  7. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

        }
    
        @Override
        public ImmutableSortedMap<K, V> build() {
          return buildOrThrow();
        }
    
        @Override
        public ImmutableSortedMap<K, V> buildOrThrow() {
          SortedMap<K, V> delegate = newModifiableDelegate(comparator);
          for (Entry<? extends K, ? extends V> entry : entries) {
            putEntryWithChecks(delegate, entry);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 16.6K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

       *         .put(1, "one")
       *         .put(2, "two")
       *         .put(3, "three")
       *         .buildOrThrow();
       * }
       *
       * <p>For <i>small</i> immutable sorted maps, the {@code ImmutableSortedMap.of()} methods are even
       * more convenient.
       *
       * <p>Builder instances can be reused - it is safe to call {@link #buildOrThrow} multiple times to
       * build multiple maps in series. Each map is a superset of the maps created before it.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 54.7K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java

        ImmutableSortedMap<String, Integer> expected =
            ImmutableSortedMap.<String, Integer>naturalOrder()
                .put("one", 1)
                .put("three", 3)
                .put("two", 2)
                .buildOrThrow();
        CollectorTester.of(collector, equivalence)
            .expectCollects(expected, mapEntry("one", 1), mapEntry("two", 2), mapEntry("three", 3));
      }
    
      public void testToImmutableSortedMap_withComparator() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 29.8K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

              .put("HmacSHA1", SHA1_KEY, hmacSha1(SHA1_KEY))
              .put("HmacSHA256", SHA256_KEY, hmacSha256(SHA256_KEY))
              .put("HmacSHA512", SHA512_KEY, hmacSha512(SHA512_KEY))
              .buildOrThrow();
    
      public void testNulls() {
        NullPointerTester tester =
            new NullPointerTester().setDefault(String.class, "HmacMD5").setDefault(Key.class, MD5_KEY);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 14.2K bytes
    - Click Count (0)
Back to Top