- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 127 for ImmutableList (0.07 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java
@Override protected List<String> create(String[] elements) { return ImmutableList.copyOf(elements); } } public static class BuilderAddListGenerator extends TestStringListGenerator { @Override protected List<String> create(String[] elements) { ImmutableList.Builder<String> builder = ImmutableList.<String>builder(); for (String element : elements) { builder.add(element); }Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 14:50:24 UTC 2024 - 5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/ImmutableListCreationBenchmark.java
@Benchmark int builderAdd(int reps) { int size = this.size; int dummy = 0; for (int rep = 0; rep < reps; rep++) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); for (int i = 0; i < size; i++) { builder.add(OBJECT); } dummy += builder.build().size(); } return dummy; } @Benchmark int preSizedBuilderAdd(int reps) { int size = this.size;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 2.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableCollection.java
} private transient @Nullable ImmutableList<E> asList; public ImmutableList<E> asList() { ImmutableList<E> list = asList; return (list == null) ? (asList = createAsList()) : list; } ImmutableList<E> createAsList() { switch (size()) { case 0: return ImmutableList.of(); case 1: return ImmutableList.of(iterator().next()); default:
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 5.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java
* * @throws NullPointerException if any element of {@code tasks} is null */ private <T extends @Nullable Object> ImmutableList<Callable<T>> wrapTasks( Collection<? extends Callable<T>> tasks) { ImmutableList.Builder<Callable<T>> builder = ImmutableList.builder(); for (Callable<T> task : tasks) { builder.add(wrapTask(task)); } return builder.build(); }Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 5.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java
@LazyInit private transient ImmutableList<E> asList; @Override public ImmutableList<E> asList() { ImmutableList<E> result = asList; if (result == null) { return asList = createAsList(); } else { return result; } } @Override ImmutableList<E> createAsList() {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-testlib/src/com/google/common/testing/DummyProxy.java
import static com.google.common.testing.NullPointerTester.isNullable; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.common.reflect.AbstractInvocationHandler; import com.google.common.reflect.Invokable; import com.google.common.reflect.Parameter; import com.google.common.reflect.TypeToken; import java.io.Serializable;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 22:10:29 UTC 2025 - 4.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java
public void testPutAllNullForbidden() { assertThrows(NullPointerException.class, () -> multimap().putAll(null, singletonList(v3()))); } @SuppressWarnings("EmptyList") // ImmutableList doesn't support nullable element types @MapFeature.Require(SUPPORTS_PUT) public void testPutAllEmptyCollectionOnAbsentKey() { assertFalse(multimap().putAll(k3(), Collections.<V>emptyList())); expectUnchanged();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 7.4K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/AbstractPackageSanityTestsTest.java
public void testFindClassesToTest_testClass() { assertThat(findClassesToTest(ImmutableList.of(EmptyTest.class))).isEmpty(); assertThat(findClassesToTest(ImmutableList.of(EmptyTests.class))).isEmpty(); assertThat(findClassesToTest(ImmutableList.of(EmptyTestCase.class))).isEmpty(); assertThat(findClassesToTest(ImmutableList.of(EmptyTestSuite.class))).isEmpty(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 28 02:48:50 UTC 2024 - 5.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ComparatorsTest.java
Comparator<Iterable<String>> lexy = Comparators.lexicographical(comparator); ImmutableList<String> empty = ImmutableList.of(); ImmutableList<String> a = ImmutableList.of("a"); ImmutableList<String> aa = ImmutableList.of("a", "a"); ImmutableList<String> ab = ImmutableList.of("a", "b"); ImmutableList<String> b = ImmutableList.of("b"); testComparator(lexy, empty, a, aa, ab, b); new EqualsTester()
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Apr 12 15:07:59 UTC 2025 - 6.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/TestLogHandler.java
* getOnlyRecordLogged(), getAndClearLogRecords()...) * * TODO(cpovirk): consider renaming this method to reflect that it takes a snapshot (and/or return * an ImmutableList) */ public List<LogRecord> getStoredLogRecords() { synchronized (lock) { List<LogRecord> result = new ArrayList<>(list); return Collections.unmodifiableList(result); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 2.8K bytes - Viewed (0)