- Sort Score
- Num 10 results
- Language All
Results 11 - 18 of 18 for createWithExpectedSize (1.52 seconds)
-
android/guava-tests/test/com/google/common/collect/CompactLinkedHashSetTest.java
} public void testAllocArraysExpectedSize() { for (int i = 0; i <= CompactHashing.DEFAULT_SIZE; i++) { CompactHashSet<Integer> set = CompactHashSet.createWithExpectedSize(i); assertThat(set.needsAllocArrays()).isTrue(); assertThat(set.elements).isNull(); set.add(1); assertThat(set.needsAllocArrays()).isFalse(); int expectedSize = max(1, i);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Jan 25 16:19:30 GMT 2025 - 3.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java
map.put(2, "c"); map.remove(2); testHasMapEntriesInOrder(map, 1, "a", 4, "b", 3, "d"); } public void testTrimToSize() { CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100); map.put(1, "a"); map.put(4, "b"); map.put(3, "d"); map.put(2, "c"); map.trimToSize(); assertThat(map.entries).hasLength(4); assertThat(map.keys).hasLength(4);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 28 18:44:53 GMT 2025 - 6.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/CompactLinkedHashSetTest.java
} public void testAllocArraysExpectedSize() { for (int i = 0; i <= CompactHashing.DEFAULT_SIZE; i++) { CompactHashSet<Integer> set = CompactHashSet.createWithExpectedSize(i); assertThat(set.needsAllocArrays()).isTrue(); assertThat(set.elements).isNull(); set.add(1); assertThat(set.needsAllocArrays()).isFalse(); int expectedSize = max(1, i);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Jan 25 16:19:30 GMT 2025 - 4K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/CompactHashMapTest.java
.createTestSuite()); suite.addTestSuite(CompactHashMapTest.class); return suite; } public void testTrimToSize() { CompactHashMap<Integer, String> map = CompactHashMap.createWithExpectedSize(100); for (int i = 0; i < 10; i++) { map.put(i, Integer.toString(i)); } map.trimToSize(); assertThat(map.entries).hasLength(10); assertThat(map.keys).hasLength(10);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 5.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/CompactHashMap.java
* elements without resizing * @throws IllegalArgumentException if {@code expectedSize} is negative */ public static <K extends @Nullable Object, V extends @Nullable Object> CompactHashMap<K, V> createWithExpectedSize(int expectedSize) { return new CompactHashMap<>(expectedSize); } private static final Object NOT_FOUND = new Object(); /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Aug 09 01:14:59 GMT 2025 - 35.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/CompactHashSetTest.java
} public void testAllocArraysExpectedSize() { for (int i = 0; i <= CompactHashing.DEFAULT_SIZE; i++) { CompactHashSet<Integer> set = CompactHashSet.createWithExpectedSize(i); assertThat(set.needsAllocArrays()).isTrue(); assertThat(set.elements).isNull(); set.add(1); assertThat(set.needsAllocArrays()).isFalse(); int expectedSize = max(1, i);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Jan 25 16:19:30 GMT 2025 - 4.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java
map.put(2, "c"); map.remove(2); testHasMapEntriesInOrder(map, 1, "a", 4, "b", 3, "d"); } public void testTrimToSize() { CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100); map.put(1, "a"); map.put(4, "b"); map.put(3, "d"); map.put(2, "c"); map.trimToSize(); assertThat(map.entries).hasLength(4); assertThat(map.keys).hasLength(4);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 28 18:44:53 GMT 2025 - 7.8K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableMultiset.java
* ImmutableMultiset#builder}. */ public Builder() { this(4); } Builder(int estimatedDistinct) { this.contents = ObjectCountHashMap.createWithExpectedSize(estimatedDistinct); } Builder(boolean forSubtype) { // for ImmutableSortedMultiset not to allocate data structures not used there this.contents = null; } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 22.3K bytes - Click Count (0)