- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for expandedCapacity (0.15 sec)
-
guava-tests/test/com/google/common/collect/ImmutableCollectionTest.java
assertEquals(1, ImmutableCollection.Builder.expandedCapacity(0, 1)); assertEquals(2, ImmutableCollection.Builder.expandedCapacity(0, 2)); assertEquals(2, ImmutableCollection.Builder.expandedCapacity(1, 2)); assertEquals( Integer.MAX_VALUE, ImmutableCollection.Builder.expandedCapacity(0, Integer.MAX_VALUE)); assertEquals( Integer.MAX_VALUE, ImmutableCollection.Builder.expandedCapacity(1, Integer.MAX_VALUE)); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableLongArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 22.3K bytes - Viewed (0) -
guava/src/com/google/common/primitives/ImmutableIntArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 21.4K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableIntArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 22.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSortedSet.java
* sortAndDedup -- that is, at least c*n for some constant c > 0. Ensuring the buffer size * is at least expandedCapacity(n, n + 1) satisfies this property. */ int newLength = ImmutableCollection.Builder.expandedCapacity(n, n + 1); if (newLength > elements.length) { elements = Arrays.copyOf(elements, newLength); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableDoubleArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 23K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableList.java
this.size = 0; } private void ensureRoomFor(int newElements) { @Nullable Object[] contents = this.contents; int newCapacity = expandedCapacity(contents.length, size + newElements); // expandedCapacity handles the overflow case if (contents.length < newCapacity || copyOnWrite) { this.contents = Arrays.copyOf(contents, newCapacity); copyOnWrite = false; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 16 19:14:45 UTC 2024 - 30.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableCollection.java
* * @since 10.0 */ @DoNotMock public abstract static class Builder<E> { static final int DEFAULT_INITIAL_CAPACITY = 4; static int expandedCapacity(int oldCapacity, int minCapacity) { if (minCapacity < 0) { throw new IllegalArgumentException("cannot store more than MAX_VALUE elements"); } else if (minCapacity <= oldCapacity) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 12 16:59:15 UTC 2024 - 18.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/HashBiMap.java
*/ private void ensureCapacity(int minCapacity) { if (nextInBucketKToV.length < minCapacity) { int oldCapacity = nextInBucketKToV.length; int newCapacity = ImmutableCollection.Builder.expandedCapacity(oldCapacity, minCapacity); keys = Arrays.copyOf(keys, newCapacity); values = Arrays.copyOf(values, newCapacity); nextInBucketKToV = expandAndFillWithAbsent(nextInBucketKToV, newCapacity);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 06 16:06:58 UTC 2023 - 36.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMap.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 41.5K bytes - Viewed (0)