Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for ImmediateFuture (0.19 sec)

  1. 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)
  2. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  3. 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)
  4. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  5. 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)
  6. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

    import static com.google.common.util.concurrent.ClassPathUtil.parseJavaClassPath;
    import static com.google.common.util.concurrent.Futures.getChecked;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.CHECKED_EXCEPTION;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.ERROR;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
  8. 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)
  9. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

    import static com.google.common.util.concurrent.ClassPathUtil.parseJavaClassPath;
    import static com.google.common.util.concurrent.Futures.getChecked;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.CHECKED_EXCEPTION;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.ERROR;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
Back to top