- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 30 for getOnlyElement (0.14 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 47.1K 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); assertEquals(0, cache.size()); entry.setValue(3); assertEquals(1, cache.size()); assertEquals(3, cache.getIfPresent(1));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 15K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/ThrowablesTest.java
IllegalStateException ex = new IllegalStateException(re); assertThat(getCausalChain(ex)).containsExactly(ex, re, iae, sue).inOrder(); assertSame(sue, Iterables.getOnlyElement(getCausalChain(sue))); List<Throwable> causes = getCausalChain(ex); assertThrows(UnsupportedOperationException.class, () -> causes.add(new RuntimeException())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 14.6K 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); assertEquals(0, cache.size()); entry.setValue(3); assertEquals(1, cache.size()); assertEquals(3, cache.getIfPresent(1));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 15K bytes - Viewed (0) -
android/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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.3K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon May 17 14:07:47 UTC 2021 - 18.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MoreFiles.java
* limitations under the License. */ package com.google.common.io; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.getOnlyElement; import static java.nio.file.LinkOption.NOFOLLOW_LINKS; import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 35K bytes - Viewed (0) -
guava/src/com/google/common/io/MoreFiles.java
* limitations under the License. */ package com.google.common.io; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.getOnlyElement; import static java.nio.file.LinkOption.NOFOLLOW_LINKS; import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 34.5K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon May 17 14:07:47 UTC 2021 - 18.5K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 25.5K bytes - Viewed (0)