- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for expandedCapacity (1.05 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableCollection.java
* current array, create a new array. */ private void ensureRoomFor(int newElements) { @Nullable Object[] contents = this.contents; int newCapacity = expandedCapacity(contents.length, size + newElements); // expandedCapacity handles the overflow case if (newCapacity > contents.length || forceCopy) { this.contents = Arrays.copyOf(this.contents, newCapacity); forceCopy = false; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 21.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableCollection.java
/** GWT emulated version of {@link ImmutableCollection.Builder}. */ public abstract static class Builder<E> { static final int DEFAULT_INITIAL_CAPACITY = 4; Builder() {} static int expandedCapacity(int oldCapacity, int minCapacity) { if (minCapacity < 0) { throw new AssertionError("cannot store more than MAX_VALUE elements"); } // careful of overflow!
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 5.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableLongArray.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 22K bytes - Viewed (0) -
guava/src/com/google/common/primitives/ImmutableIntArray.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 21.4K bytes - Viewed (0) -
guava/src/com/google/common/base/Joiner.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Apr 14 15:16:19 UTC 2025 - 21K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 36.2K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Joiner.java
case 1: return second; default: return rest[index - 2]; } } }; } // cloned from ImmutableCollection private static int expandedCapacity(int oldCapacity, int minCapacity) { if (minCapacity < 0) { throw new IllegalArgumentException("cannot store more than Integer.MAX_VALUE elements"); } else if (minCapacity <= oldCapacity) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 19.3K 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 Integer.MAX_VALUE elements"); } else if (minCapacity <= oldCapacity) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
* elements. */ private void ensureCapacity(int minCapacity) { if (minCapacity > dedupedElements.length) { int newCapacity = ImmutableCollection.Builder.expandedCapacity(dedupedElements.length, minCapacity); dedupedElements = Arrays.copyOf(dedupedElements, newCapacity); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.2K bytes - Viewed (0)