- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for ImmediateFuture (0.24 sec)
-
android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java
/** Implementation of {@link Futures#immediateFuture}. */ @GwtCompatible @ElementTypesAreNonnullByDefault // TODO(cpovirk): Make this final (but that may break Mockito spy calls). class ImmediateFuture<V extends @Nullable Object> implements ListenableFuture<V> { static final ListenableFuture<?> NULL = new ImmediateFuture<@Nullable Object>(null);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Dec 13 19:45:20 GMT 2023 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
ClosingFuture.whenAllSucceed( ClosingFuture.eventuallyClosing(immediateFuture(closeable1), closingExecutor), ClosingFuture.from(immediateFuture("value2")), ClosingFuture.from(immediateFuture("value3")), ClosingFuture.from(immediateFuture("value4")), ClosingFuture.from(immediateFuture("value5"))) .call( new ClosingFunction5<
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 75.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
ClosingFuture.whenAllSucceed( ClosingFuture.eventuallyClosing(immediateFuture(closeable1), closingExecutor), ClosingFuture.from(immediateFuture("value2")), ClosingFuture.from(immediateFuture("value3")), ClosingFuture.from(immediateFuture("value4")), ClosingFuture.from(immediateFuture("value5"))) .call( new ClosingFunction5<
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 74.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
ListenableFuture<String> f = new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {}; verify(!(f instanceof FluentFuture)); assertThat(FluentFuture.from(f).get()).isEqualTo("a"); // TODO(cpovirk): Test forwarding more extensively. } public void testAddCallback() { FluentFuture<String> f = FluentFuture.from(immediateFuture("a")); final boolean[] called = new boolean[1]; f.addCallback(
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
ListenableFuture<String> f = new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {}; verify(!(f instanceof FluentFuture)); assertThat(FluentFuture.from(f).get()).isEqualTo("a"); // TODO(cpovirk): Test forwarding more extensively. } public void testAddCallback() { FluentFuture<String> f = FluentFuture.from(immediateFuture("a")); final boolean[] called = new boolean[1]; f.addCallback(
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetDoneTest.java
@GwtCompatible public class FuturesGetDoneTest extends TestCase { public void testSuccessful() throws ExecutionException { assertThat(getDone(immediateFuture("a"))).isEqualTo("a"); } public void testSuccessfulNull() throws ExecutionException { assertThat(getDone(Futures.<@Nullable String>immediateFuture(null))).isEqualTo(null); } public void testFailed() { Exception failureCause = new Exception(); try {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 2.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
} }; // Since holder.value is 2, applying 4 should yield 6. assertEquals(6, adder.apply(4).intValue()); ListenableFuture<Integer> immediateFuture = immediateFuture(4); Future<Integer> transformedFuture = transform(immediateFuture, adder, directExecutor()); // The composed future also yields 6. assertEquals(6, getDone(transformedFuture).intValue());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 144.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java
public void testGetUnchecked_success() { assertEquals("foo", getUnchecked(immediateFuture("foo"))); } @J2ktIncompatible @GwtIncompatible // Thread.interrupt public void testGetUnchecked_interrupted() { Thread.currentThread().interrupt(); try { assertEquals("foo", getUnchecked(immediateFuture("foo"))); assertTrue(Thread.currentThread().isInterrupted()); } finally {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 4.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetDoneTest.java
@GwtCompatible public class FuturesGetDoneTest extends TestCase { public void testSuccessful() throws ExecutionException { assertThat(getDone(immediateFuture("a"))).isEqualTo("a"); } public void testSuccessfulNull() throws ExecutionException { assertThat(getDone(Futures.<@Nullable String>immediateFuture(null))).isEqualTo(null); } public void testFailed() { Exception failureCause = new Exception(); try {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 2.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java
public void testGetUnchecked_success() { assertEquals("foo", getUnchecked(immediateFuture("foo"))); } @J2ktIncompatible @GwtIncompatible // Thread.interrupt public void testGetUnchecked_interrupted() { Thread.currentThread().interrupt(); try { assertEquals("foo", getUnchecked(immediateFuture("foo"))); assertTrue(Thread.currentThread().isInterrupted()); } finally {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 4.3K bytes - Viewed (0)