- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for newArrayListWithCapacity (0.13 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 3.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
return valuesInSet; } Element[] getQueries() { return queries; } private Element[] createQueries(Set<Element> elementsInSet, int numQueries) { List<Element> queryList = Lists.newArrayListWithCapacity(numQueries); int numGoodQueries = (int) (numQueries * hitRate + 0.5); // add good queries int size = elementsInSet.size(); if (size > 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
return valuesInSet; } Element[] getQueries() { return queries; } private Element[] createQueries(Set<Element> elementsInSet, int numQueries) { List<Element> queryList = Lists.newArrayListWithCapacity(numQueries); int numGoodQueries = (int) (numQueries * hitRate + 0.5); // add good queries int size = elementsInSet.size(); if (size > 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 15:16:45 UTC 2024 - 10.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:18:12 UTC 2024 - 32.7K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 14 22:14:46 UTC 2024 - 11.1K bytes - Viewed (0)