- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for newArrayListWithCapacity (0.12 sec)
-
android/guava/src/com/google/common/util/concurrent/CollectionFuture.java
* or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.util.concurrent; import static com.google.common.collect.Lists.newArrayListWithCapacity; import static java.util.Collections.unmodifiableList; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.Lists;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 3.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ClassSanityTester.java
FactoryMethodReturnsNullException { List<Parameter> params = factory.getParameters(); List<FreshValueGenerator> argGenerators = Lists.newArrayListWithCapacity(params.size()); List<@Nullable Object> args = Lists.newArrayListWithCapacity(params.size()); for (Parameter param : params) { FreshValueGenerator generator = newFreshValueGenerator(); argGenerators.add(generator);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
q.remove(11); q.remove(10); // Now we're in the critical state: [1, 15, 13, 8, 14] // Removing 8 while iterating caused duplicates in iteration result. List<Integer> result = Lists.newArrayListWithCapacity(initial.size()); for (Iterator<Integer> iter = q.iterator(); iter.hasNext(); ) { Integer value = iter.next(); result.add(value); if (value == 8) { iter.remove(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java
final ArrayList<E> contents; public Builder() { this.contents = Lists.newArrayList(); } Builder(int initialCapacity) { this.contents = Lists.newArrayListWithCapacity(initialCapacity); } @CanIgnoreReturnValue @Override public Builder<E> add(E element) { contents.add(checkNotNull(element)); return this; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ListsTest.java
ArrayList<Integer> list = Lists.newArrayListWithCapacity(0); assertEquals(emptyList(), list); ArrayList<Integer> bigger = Lists.newArrayListWithCapacity(256); assertEquals(emptyList(), bigger); } public void testNewArrayListWithCapacity_negative() { assertThrows(IllegalArgumentException.class, () -> Lists.newArrayListWithCapacity(-1)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java
@Nullable Comparator<? super V> valueComparator; public Builder() { this.entries = Lists.newArrayList(); } Builder(int initCapacity) { this.entries = Lists.newArrayListWithCapacity(initCapacity); } @CanIgnoreReturnValue public Builder<K, V> put(K key, V value) { entries.add(entryOf(key, value)); return this; } @CanIgnoreReturnValue
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 16.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
FactoryMethodReturnsNullException { List<Parameter> params = factory.getParameters(); List<FreshValueGenerator> argGenerators = Lists.newArrayListWithCapacity(params.size()); List<@Nullable Object> args = Lists.newArrayListWithCapacity(params.size()); for (Parameter param : params) { FreshValueGenerator generator = newFreshValueGenerator(); argGenerators.add(generator);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 11.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Lists.java
*/ @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call public static <E extends @Nullable Object> ArrayList<E> newArrayListWithCapacity( int initialArraySize) { checkNonnegative(initialArraySize, "initialArraySize"); // for GWT. return new ArrayList<>(initialArraySize); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 42.2K bytes - Viewed (0)