- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 33 for ensureCapacity (0.23 sec)
-
guava-tests/test/com/google/common/primitives/DoublesTest.java
assertThat(Doubles.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Doubles.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Doubles.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat( Arrays.equals( new double[] {(double) 1, (double) 0, (double) 0}, Doubles.ensureCapacity(ARRAY1, 2, 1))) .isTrue(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 32.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[] {(float) 1, (float) 0, (float) 0}, Floats.ensureCapacity(ARRAY1, 2, 1))) .isTrue(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 30.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/LongsTest.java
} } public void testEnsureCapacity() { assertThat(Longs.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY); assertThat(Longs.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1); assertThat(Longs.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1); assertThat(Longs.ensureCapacity(ARRAY1, 2, 1)) .isEqualTo(new long[] {(long) 1, (long) 0, (long) 0}); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 29.8K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 06 16:06:58 UTC 2023 - 36.4K bytes - Viewed (0) -
src/main/java/org/codelibs/core/collection/ArrayMap.java
for (Entry<K, V> e = mapTable[0]; e != null; e = e.next) { if (e.key == null) { return swapValue(e, value); } } } ensureCapacity(); index = (hashCode & 0x7FFFFFFF) % mapTable.length; final Entry<K, V> e = new Entry<>(hashCode, key, value, mapTable[index]); mapTable[index] = e; listTable[size++] = e;
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 20.6K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 44.6K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 41.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ObjectCountHashMap.java
/** Returns a new entry value by changing the "next" index of an existing entry */ private static long swapNext(long entry, int newNext) { return (HASH_MASK & entry) | (NEXT_MASK & newNext); } void ensureCapacity(int minCapacity) { if (minCapacity > entries.length) { resizeEntries(minCapacity); } if (minCapacity >= threshold) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 01 22:07:10 UTC 2021 - 15K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 20.4K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 20.4K bytes - Viewed (0)