- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for createWithExpectedSize (0.48 sec)
-
android/guava/src/com/google/common/collect/Platform.java
return CompactHashMap.createWithExpectedSize(expectedSize); } /** * Returns the platform preferred implementation of an insertion ordered map based on a hash * table. */ static <K extends @Nullable Object, V extends @Nullable Object> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { return CompactLinkedHashMap.createWithExpectedSize(expectedSize); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 06 17:52:51 UTC 2024 - 5.3K bytes - Viewed (0) -
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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 3.3K bytes - Viewed (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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 6.6K bytes - Viewed (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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 5.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/CompactLinkedHashSet.java
*/ public static <E extends @Nullable Object> CompactLinkedHashSet<E> create( Collection<? extends E> collection) { CompactLinkedHashSet<E> set = createWithExpectedSize(collection.size()); set.addAll(collection); return set; } /** * Creates a {@code CompactLinkedHashSet} instance containing the given elements in unspecified * order. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 00:15:47 UTC 2024 - 9.7K bytes - Viewed (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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 4.6K bytes - Viewed (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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 7.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashSet.java
*/ public static <E extends @Nullable Object> CompactHashSet<E> create( Collection<? extends E> collection) { CompactHashSet<E> set = createWithExpectedSize(collection.size()); set.addAll(collection); return set; } /** * Creates a <i>mutable</i> {@code CompactHashSet} instance containing the given elements in * unspecified order. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 24K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactLinkedHashMap.java
* @throws IllegalArgumentException if {@code expectedSize} is negative */ public static <K extends @Nullable Object, V extends @Nullable Object> CompactLinkedHashMap<K, V> createWithExpectedSize(int expectedSize) { return new CompactLinkedHashMap<>(expectedSize); } private static final int ENDPOINT = -2; /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 8.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/CompactHashSet.java
*/ public static <E extends @Nullable Object> CompactHashSet<E> create( Collection<? extends E> collection) { CompactHashSet<E> set = createWithExpectedSize(collection.size()); set.addAll(collection); return set; } /** * Creates a <i>mutable</i> {@code CompactHashSet} instance containing the given elements in * unspecified order.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 24.9K bytes - Viewed (0)