- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for newArrayListWithCapacity (0.1 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) -
android/guava-tests/benchmark/com/google/common/collect/ImmutableListCreationBenchmark.java
return dummy; } @Benchmark int copyPreSizedArrayList(int reps) { int size = this.size; int tmp = 0; for (int rep = 0; rep < reps; rep++) { List<Object> builder = Lists.newArrayListWithCapacity(size); for (int i = 0; i < size; i++) { builder.add(OBJECT); } tmp += ImmutableList.copyOf(builder).size(); } return tmp; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 2.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java
Object[] array; ArrayList<Object> arrayList; LinkedList<Object> linkedList; @BeforeExperiment void setUp() { array = new Object[size]; arrayList = Lists.newArrayListWithCapacity(size); linkedList = new LinkedList<>(); for (int i = 0; i < size; i++) { Object value = new Object(); array[i] = value; arrayList.add(value); linkedList.add(value); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 3.5K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 4.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java
random = new Random(0xdeadbeef); // fix the seed so results are comparable across runs int nonAlpha = size / nonAlphaRatio; int alpha = size - nonAlpha; List<Character> chars = Lists.newArrayListWithCapacity(size); for (int i = 0; i < alpha; i++) { chars.add(randomAlpha()); } for (int i = 0; i < nonAlpha; i++) { chars.add(randomNonAlpha()); } Collections.shuffle(chars, random);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.8K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 4.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java
random = new Random(0xdeadbeef); // fix the seed so results are comparable across runs int nonAlpha = size / nonAlphaRatio; int alpha = size - nonAlpha; List<Character> chars = Lists.newArrayListWithCapacity(size); for (int i = 0; i < alpha; i++) { chars.add(randomAlpha()); } for (int i = 0; i < nonAlpha; i++) { chars.add(randomNonAlpha()); } Collections.shuffle(chars, random);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.8K 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)