- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 31 for builderWithExpectedSize (0.11 seconds)
-
android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java
ImmutableSet<Integer> unused = builder.build(); } } @GwtIncompatible // Builder impl public void testPresizedBuilderDedups() { ImmutableSet.Builder<String> builder = ImmutableSet.builderWithExpectedSize(4); builder.add("a"); assertEquals(1, builder.size); builder.add("a"); assertEquals(1, builder.size); builder.add("b", "c", "d"); assertEquals(4, builder.size);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 14.1K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableList.java
* but not exactly, the number of elements added to the builder. * * @since 23.1 */ public static <E> Builder<E> builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new ImmutableList.Builder<>(expectedSize); } /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 30.6K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableMap.java
* but not exactly, the number of entries added to the builder. * * @since 23.1 */ public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); } static void checkNoConflict(
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) -
android/guava/src/com/google/common/collect/ImmutableMap.java
* but not exactly, the number of entries added to the builder. * * @since 23.1 */ public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); } static void checkNoConflict(
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) -
guava/src/com/google/common/collect/ImmutableSortedMap.java
* @deprecated Not supported for ImmutableSortedMap. */ @DoNotCall("Use naturalOrder (which does not accept an expected size)") @Deprecated public static <K, V> ImmutableSortedMap.Builder<K, V> builderWithExpectedSize(int expectedSize) { throw new UnsupportedOperationException(); } /** * Not supported. <b>You are attempting to create a map that may contain a non-{@code Comparable}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) -
android/guava/src/com/google/common/collect/ImmutableSortedMap.java
* @deprecated Not supported for ImmutableSortedMap. */ @DoNotCall("Use naturalOrder (which does not accept an expected size)") @Deprecated public static <K, V> ImmutableSortedMap.Builder<K, V> builderWithExpectedSize(int expectedSize) { throw new UnsupportedOperationException(); } /** * Not supported. <b>You are attempting to create a map that may contain a non-{@code Comparable}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) -
guava-tests/test/com/google/common/collect/ImmutableSetTest.java
*/ private static final double HASH_FLOODING_FPP = 0.001; public void testReuseBuilderReducingHashTableSizeWithPowerOfTwoTotalElements() { ImmutableSet.Builder<Object> builder = ImmutableSet.builderWithExpectedSize(6); builder.add(0); ImmutableSet<Object> unused = builder.build(); ImmutableSet<Object> subject = builder.add(1).add(2).add(3).build(); assertFalse(subject.contains(4)); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 14.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java
} @GwtIncompatible public void testBuilderExactlySizedReusesArray() { ImmutableBiMap.Builder<Integer, Integer> builder = ImmutableBiMap.builderWithExpectedSize(10); Object[] builderArray = builder.alternatingKeysAndValues; for (int i = 0; i < 10; i++) { builder.put(i, i); } Object[] builderArrayAfterPuts = builder.alternatingKeysAndValues;
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)