- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 28 for ensureCapacity (0.07 sec)
-
guava-tests/test/com/google/common/primitives/ShortsTest.java
} } public void testEnsureCapacity() { assertThat(Shorts.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Shorts.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Shorts.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat(Shorts.ensureCapacity(ARRAY1, 2, 1)) .isEqualTo(new short[] {(short) 1, (short) 0, (short) 0}); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/FloatsTest.java
} } public void testEnsureCapacity() { assertThat(Floats.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Floats.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Floats.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat(Arrays.equals(new float[] {1.0f, 0.0f, 0.0f}, Floats.ensureCapacity(ARRAY1, 2, 1))) .isTrue(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
} } public void testEnsureCapacity() { assertThat(Ints.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Ints.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Ints.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat(Ints.ensureCapacity(ARRAY1, 2, 1)).isEqualTo(new int[] {(int) 1, (int) 0, (int) 0}); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/FloatsTest.java
} } public void testEnsureCapacity() { assertThat(Floats.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Floats.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Floats.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat(Arrays.equals(new float[] {1.0f, 0.0f, 0.0f}, Floats.ensureCapacity(ARRAY1, 2, 1))) .isTrue(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
} } /** Adds e to the insertion-order array of deduplicated elements. Calls ensureCapacity. */ final void addDedupedElement(E e) { ensureCapacity(distinct + 1); dedupedElements[distinct++] = e; } /** * Adds e to this SetBuilderImpl, returning the updated result. Only use the returned
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMap.java
Builder(int initialCapacity) { this.entries = new @Nullable Entry[initialCapacity]; this.size = 0; this.entriesUsed = false; } private void ensureCapacity(int minCapacity) { if (minCapacity > entries.length) { entries = Arrays.copyOf( entries, ImmutableCollection.Builder.expandedCapacity(entries.length, minCapacity));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 44.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/HashBiMap.java
} @Override public int size() { return size; } /** * Ensures that all of the internal structures in the HashBiMap are ready for this many elements. */ private void ensureCapacity(int minCapacity) { if (nextInBucketKToV.length < minCapacity) { int oldCapacity = nextInBucketKToV.length; int newCapacity = ImmutableCollection.Builder.expandedCapacity(oldCapacity, minCapacity);
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/collect/ImmutableMap.java
Builder(int initialCapacity) { this.alternatingKeysAndValues = new @Nullable Object[2 * initialCapacity]; this.size = 0; this.entriesUsed = false; } private void ensureCapacity(int minCapacity) { if (minCapacity * 2 > alternatingKeysAndValues.length) { alternatingKeysAndValues = Arrays.copyOf( alternatingKeysAndValues,
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 41.2K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Booleans.java
* @return an array containing the values of {@code array}, with guaranteed minimum length {@code * minLength} */ public static boolean[] ensureCapacity(boolean[] array, int minLength, int padding) { checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); checkArgument(padding >= 0, "Invalid padding: %s", padding);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 20.5K bytes - Viewed (0) -
guava/src/com/google/common/primitives/Booleans.java
* @return an array containing the values of {@code array}, with guaranteed minimum length {@code * minLength} */ public static boolean[] ensureCapacity(boolean[] array, int minLength, int padding) { checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); checkArgument(padding >= 0, "Invalid padding: %s", padding);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 20.5K bytes - Viewed (0)