- Sort Score
- Result 10 results
- Languages All
Results 21 - 28 of 28 for getOnlyElement (0.06 sec)
-
guava/src/com/google/common/collect/ImmutableTable.java
* limitations under the License. */ package com.google.common.collect; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Tables.immutableCell; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible;
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 21:07:18 UTC 2025 - 17.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
} } public void testWriteThroughEntry() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); Entry<Object, Object> entry = Iterables.getOnlyElement(cache.asMap().entrySet()); cache.invalidate(1); assertThat(cache.size()).isEqualTo(0); entry.setValue(3); assertThat(cache.size()).isEqualTo(1);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 15.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
assertThat(future.isDone()).isTrue(); // inspect state and ensure it is correct! // asserts that all get calling threads received the same value Object result = Iterables.getOnlyElement(finalResults); if (result == CancellationException.class) { assertTrue(future.isCancelled()); if (future.wasInterrupted()) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 46.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterators.java
* iterator is unspecified. */ @ParametricNullness public static <T extends @Nullable Object> T getOnlyElement( Iterator<? extends T> iterator, @ParametricNullness T defaultValue) { return iterator.hasNext() ? getOnlyElement(iterator) : defaultValue; } /** * Copies an iterator's elements into an array. The iterator will be left exhausted: its {@code
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 16 12:42:11 UTC 2025 - 51.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableRangeSet.java
import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Iterators.emptyIterator; import static com.google.common.collect.Iterators.peekingIterator; import static com.google.common.collect.Range.rangeLexOrdering;
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 27.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
} } public void testWriteThroughEntry() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); Entry<Object, Object> entry = Iterables.getOnlyElement(cache.asMap().entrySet()); cache.invalidate(1); assertThat(cache.size()).isEqualTo(0); entry.setValue(3); assertThat(cache.size()).isEqualTo(1);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 15.7K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Verify.java
} return reference; } // TODO(kevinb): consider <T> T verifySingleton(Iterable<T>) to take over for // Iterables.getOnlyElement() private Verify() {}Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 18.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java
assertThat(suppressed[1]).hasCauseThat().isInstanceOf(IllegalStateException.class); assertThat(suppressed[1]).hasCauseThat().hasMessageThat().isEqualTo("start failure"); LogRecord record = Iterables.getOnlyElement(logHandler.getStoredLogRecords()); // We log failures that occur after startup assertThat(record.getMessage()) .contains("Service FailRunService [FAILED] has failed in the RUNNING state"); }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 17:49:12 UTC 2025 - 25.5K bytes - Viewed (0)