- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for newHashSetWithExpectedSize (0.16 sec)
-
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java
} static <K, V> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { return Maps.newLinkedHashMapWithExpectedSize(expectedSize); } static <E> Set<E> newHashSetWithExpectedSize(int expectedSize) { return Sets.newHashSetWithExpectedSize(expectedSize); } static <E> Set<E> newConcurrentHashSet() { // GWT's ConcurrentHashMap is a wrapper around HashMap, but it rejects null keys, which matches
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 06 17:52:51 UTC 2024 - 5K bytes - Viewed (0) -
guava/src/com/google/common/collect/Platform.java
} /** Returns the platform preferred implementation of a set based on a hash table. */ static <E extends @Nullable Object> Set<E> newHashSetWithExpectedSize(int expectedSize) { return Sets.newHashSetWithExpectedSize(expectedSize); } /** Returns the platform preferred implementation of a thread-safe hash set. */ static <E> Set<E> newConcurrentHashSet() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 06 17:52:51 UTC 2024 - 5.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
queryList.add(candidate); } } shuffle(queryList, random); return queryList.toArray(new Element[0]); } private Set<Element> createData() { Set<Element> set = Sets.newHashSetWithExpectedSize(size); while (set.size() < size) { set.add(newElement()); } return set; } private Element newElement() { int value = random.nextInt();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
queryList.add(candidate); } } shuffle(queryList, random); return queryList.toArray(new Element[0]); } private Set<Element> createData() { Set<Element> set = Sets.newHashSetWithExpectedSize(size); while (set.size() < size) { set.add(newElement()); } return set; } private Element newElement() { int value = random.nextInt();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Platform.java
return CompactLinkedHashMap.createWithExpectedSize(expectedSize); } /** Returns the platform preferred implementation of a set based on a hash table. */ static <E extends @Nullable Object> Set<E> newHashSetWithExpectedSize(int expectedSize) { return CompactHashSet.createWithExpectedSize(expectedSize); } /** * Returns the platform preferred implementation of an insertion ordered set based on a hash * table. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 06 17:52:51 UTC 2024 - 5.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/HashMultimap.java
* * @return a new {@code HashSet} containing a collection of values for one key */ @Override Set<V> createCollection() { return Platform.<V>newHashSetWithExpectedSize(expectedValuesPerKey); } /** * @serialData expectedValuesPerKey, number of distinct keys, and then for each distinct key: the * key, number of values for that key, and the key's values */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 10:02:49 UTC 2024 - 6.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
} // ensure that bulkGet returns locks in monotonically increasing order for (int objectsNum = 1; objectsNum <= striped.size() * 2; objectsNum++) { Set<Object> objects = Sets.newHashSetWithExpectedSize(objectsNum); for (int i = 0; i < objectsNum; i++) { objects.add(new Object()); } Iterable<?> locks = striped.bulkGet(objects);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
} // ensure that bulkGet returns locks in monotonically increasing order for (int objectsNum = 1; objectsNum <= striped.size() * 2; objectsNum++) { Set<Object> objects = Sets.newHashSetWithExpectedSize(objectsNum); for (int i = 0; i < objectsNum; i++) { objects.add(new Object()); } Iterable<?> locks = striped.bulkGet(objects);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 48.6K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 17.5K bytes - Viewed (0)