- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for newHashSetWithExpectedSize (0.29 sec)
-
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 {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 17.5K 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;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 03 20:10:02 GMT 2023 - 25.5K 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() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 47.9K bytes - Viewed (1) -
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;
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Oct 03 20:10:02 GMT 2023 - 23.2K 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);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 25.3K bytes - Viewed (0) -
android/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);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 25.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/LinkedListMultimap.java
current.value = value; } } /** An {@code Iterator} over distinct keys in key head order. */ private class DistinctKeyIterator implements Iterator<K> { final Set<K> seenKeys = Sets.<K>newHashSetWithExpectedSize(keySet().size()); @CheckForNull Node<K, V> next = head; @CheckForNull Node<K, V> current; int expectedModCount = modCount; private void checkForConcurrentModification() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Oct 13 14:11:58 GMT 2023 - 27.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++) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 30.1K 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++) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 30.1K 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. */
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 35.4K bytes - Viewed (0)