- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for newArrayListWithCapacity (0.25 sec)
-
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) -
guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
EnumMap<E, LockGraphNode> map = Maps.newEnumMap(clazz); E[] keys = clazz.getEnumConstants(); int numKeys = keys.length; ArrayList<LockGraphNode> nodes = Lists.newArrayListWithCapacity(numKeys); // Create a LockGraphNode for each enum value. for (E key : keys) { LockGraphNode node = new LockGraphNode(getLockName(key)); nodes.add(node); map.put(key, node); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K 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) -
guava/src/com/google/common/collect/Lists.java
*/ @GwtCompatible(serializable = true) @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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 43.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 33.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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 33.2K bytes - Viewed (0)