- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for expectedSize (0.08 sec)
-
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
* sized appropriately to hold {@code expectedSize} elements. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static Builder<Comparable> expectedSize(int expectedSize) { return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultisetElementSetTester.java
Set<E> elementSet = getMultiset().elementSet(); int size = getNumElements(); int expectedSize = size - getMultiset().count(e0()); assertTrue(elementSet.remove(e0())); assertFalse(getMultiset().contains(e0())); assertEquals(expectedSize, getMultiset().size()); } @CollectionSize.Require(SEVERAL) @CollectionFeature.Require(SUPPORTS_REMOVE)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java
} @GwtIncompatible("Builder impl") public void testPresizedBuilderForceCopy() { for (int expectedSize = 1; expectedSize < 4; expectedSize++) { ImmutableSet.Builder<Integer> builder = ImmutableSet.builderWithExpectedSize(expectedSize); builder.add(-1); Object[] prevArray = null; for (int i = 0; i < 10; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 13.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java
* sized appropriately to hold {@code expectedSize} elements. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static Builder<Comparable> expectedSize(int expectedSize) { return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultisetElementSetTester.java
Set<E> elementSet = getMultiset().elementSet(); int size = getNumElements(); int expectedSize = size - getMultiset().count(e0()); assertTrue(elementSet.remove(e0())); assertFalse(getMultiset().contains(e0())); assertEquals(expectedSize, getMultiset().size()); } @CollectionSize.Require(SEVERAL) @CollectionFeature.Require(SUPPORTS_REMOVE)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.expectedSize(8).create(); assertEquals(8, queue.capacity()); checkUnbounded(queue); checkNatural(queue); } public void testCreation_expectedSize_comparator() { MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).expectedSize(8).create(); assertEquals(8, queue.capacity());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashing.java
* minimum hashtable size, whichever is greater. */ static int tableSize(int expectedSize) { // We use entries next == 0 to indicate UNSET, so actual capacity is 1 less than requested. return max(MIN_HASH_TABLE_SIZE, Hashing.closedTableSize(expectedSize + 1, 1.0)); } /** Creates and returns a properly-sized array with the given number of buckets. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 15:34:52 UTC 2024 - 7.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.expectedSize(8).create(); assertEquals(8, queue.capacity()); checkUnbounded(queue); checkNatural(queue); } public void testCreation_expectedSize_comparator() { MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).expectedSize(8).create(); assertEquals(8, queue.capacity());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableBiMap.java
* @since 23.1 */ public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); } /** * A builder for creating immutable bimap instances, especially {@code public static final} bimaps * ("constant bimaps"). Example: * * <pre>{@code * static final ImmutableBiMap<String, Integer> WORD_TO_INT =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 22.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
* without resizing * @throws IllegalArgumentException if {@code expectedSize} is negative */ @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call public static <E extends @Nullable Object> HashSet<E> newHashSetWithExpectedSize( int expectedSize) { return new HashSet<>(Maps.capacity(expectedSize)); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 78.8K bytes - Viewed (0)