- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 23 for newArrayListWithCapacity (0.12 sec)
-
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.4K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/SubscriberRegistry.java
*/ Iterator<Subscriber> getSubscribers(Object event) { ImmutableSet<Class<?>> eventTypes = flattenHierarchy(event.getClass()); List<Iterator<Subscriber>> subscriberIterators = Lists.newArrayListWithCapacity(eventTypes.size()); for (Class<?> eventType : eventTypes) { CopyOnWriteArraySet<Subscriber> eventSubscribers = subscribers.get(eventType); if (eventSubscribers != null) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 10.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* the License. */ package com.google.common.util.concurrent; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayListWithCapacity; import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting;
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Sep 11 17:06:34 UTC 2025 - 35.9K 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 Dec 26 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 11.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSortedMultiset.java
*/ public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of( E e1, E e2, E e3, E e4, E e5, E e6, E... remaining) { int size = remaining.length + 6; List<E> all = Lists.newArrayListWithCapacity(size); Collections.addAll(all, e1, e2, e3, e4, e5, e6); Collections.addAll(all, remaining); return copyOf(Ordering.natural(), all); } /**
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 21:07:18 UTC 2025 - 29.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ServiceManager.java
return builder.build(); } ImmutableMap<Service, Long> startupTimes() { List<Entry<Service, Long>> loadTimes; monitor.enter(); try { loadTimes = Lists.newArrayListWithCapacity(startupTimers.size()); // N.B. There will only be an entry in the map if the service has started for (Entry<Service, Stopwatch> entry : startupTimers.entrySet()) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 17:49:12 UTC 2025 - 32.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ServiceManager.java
return builder.build(); } ImmutableMap<Service, Long> startupTimes() { List<Entry<Service, Long>> loadTimes; monitor.enter(); try { loadTimes = Lists.newArrayListWithCapacity(startupTimers.size()); // N.B. There will only be an entry in the map if the service has started for (Entry<Service, Stopwatch> entry : startupTimers.entrySet()) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 17:49:12 UTC 2025 - 33.2K bytes - Viewed (1) -
guava-testlib/src/com/google/common/testing/FreshValueGenerator.java
} } Method generate = GENERATORS.get(rawType); if (generate != null) { ImmutableList<Parameter> params = Invokable.from(generate).getParameters(); List<Object> args = Lists.newArrayListWithCapacity(params.size()); TypeVariable<?>[] typeVars = rawType.getTypeParameters(); for (int i = 0; i < params.size(); i++) { TypeToken<?> paramType = type.resolveType(typeVars[i]);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.7K bytes - Viewed (0) -
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 42.6K bytes - Viewed (0)