- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for newHashSetWithExpectedSize (0.08 sec)
-
android/guava/src/com/google/common/collect/LinkedListMultimap.java
} } /** An {@code Iterator} over distinct keys in key head order. */ private final class DistinctKeyIterator implements Iterator<K> { final Set<K> seenKeys = Sets.<K>newHashSetWithExpectedSize(keySet().size()); @Nullable Node<K, V> next = head; @Nullable Node<K, V> current; int expectedModCount = modCount; private void checkForConcurrentModification() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 26.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/CharMatcherTest.java
checkExactMatches(m, chars); } } static void checkExactMatches(CharMatcher m, char[] chars) { Set<Character> positive = Sets.newHashSetWithExpectedSize(chars.length); for (char c : chars) { positive.add(c); } for (int c = 0; c <= Character.MAX_VALUE; c++) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 30.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/SetsTest.java
} public void testNewHashSetWithExpectedSizeSmall() { HashSet<Integer> set = Sets.newHashSetWithExpectedSize(0); verifySetContents(set, EMPTY_COLLECTION); } public void testNewHashSetWithExpectedSizeLarge() { HashSet<Integer> set = Sets.newHashSetWithExpectedSize(1000); verifySetContents(set, EMPTY_COLLECTION); } public void testNewHashSetFromIterator() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 45.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MultimapBuilder.java
this.expectedValuesPerKey = checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey"); } @Override public Set<V> get() { return Platform.newHashSetWithExpectedSize(expectedValuesPerKey); } } private static final class LinkedHashSetSupplier<V extends @Nullable Object> implements Supplier<Set<V>>, Serializable {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 18K bytes - Viewed (0) -
guava/src/com/google/common/collect/MultimapBuilder.java
this.expectedValuesPerKey = checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey"); } @Override public Set<V> get() { return Platform.newHashSetWithExpectedSize(expectedValuesPerKey); } } private static final class LinkedHashSetSupplier<V extends @Nullable Object> implements Supplier<Set<V>>, Serializable {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 18K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
* collision rate looks sane. */ static void assertInvariants(HashFunction hashFunction) { int objects = 100; Set<HashCode> hashcodes = Sets.newHashSetWithExpectedSize(objects); Random random = new Random(314159); for (int i = 0; i < objects; i++) { int value = random.nextInt(); HashCode hashcode1 = hashFunction.hashInt(value);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 25.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java
.build(new DelayingIdentityLoader<String>(computationShouldWait, computationLatch)); int nThreads = 100; int nTasks = 1000; int nSeededEntries = 100; Set<String> expectedKeys = Sets.newHashSetWithExpectedSize(nTasks + nSeededEntries); // seed the map, so its segments have a count>0; otherwise, clear() won't visit the in-progress // entries for (int i = 0; i < nSeededEntries; i++) { String s = "b" + i;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 25.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
.build(new DelayingIdentityLoader<String>(computationShouldWait, computationLatch)); int nThreads = 100; int nTasks = 1000; int nSeededEntries = 100; Set<String> expectedKeys = Sets.newHashSetWithExpectedSize(nTasks + nSeededEntries); // seed the map, so its segments have a count>0; otherwise, clear() won't visit the in-progress // entries for (int i = 0; i < nSeededEntries; i++) { String s = "b" + i;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 25K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
private final Set<Object> delegate; JdkBackedSetBuilderImpl(SetBuilderImpl<E> toCopy) { super(toCopy); // initializes dedupedElements and distinct delegate = Sets.newHashSetWithExpectedSize(distinct); for (int i = 0; i < distinct; i++) { /* * requireNonNull is safe because we ensure that the first `distinct` elements have been * populated. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/CharMatcherTest.java
checkExactMatches(m, chars); } } static void checkExactMatches(CharMatcher m, char[] chars) { Set<Character> positive = Sets.newHashSetWithExpectedSize(chars.length); for (char c : chars) { positive.add(c); } for (int c = 0; c <= Character.MAX_VALUE; c++) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 30.4K bytes - Viewed (0)