Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for immediateFuture (0.05 sec)

  1. 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"));
        boolean[] called = new boolean[1];
        f.addCallback(
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  2. 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 {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  3. 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 {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetDoneTest.java

    import static com.google.common.util.concurrent.Futures.immediateCancelledFuture;
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.Futures.immediateVoidFuture;
    import static com.google.common.util.concurrent.ReflectionFreeAssertThrows.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 01:35:55 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheLoaderTest.java

     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableMap;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.ArrayDeque;
    import java.util.Deque;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheLoaderTest.java

     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableMap;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.ArrayDeque;
    import java.util.Deque;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.Futures.transformAsync;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.Futures.transformAsync;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

     * the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.util.concurrent.ListenableFuture;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Futures.java

          @ParametricNullness V value) {
        if (value == null) {
          // This cast is safe because null is assignable to V for all V (i.e. it is bivariant)
          @SuppressWarnings("unchecked")
          ListenableFuture<V> typedNull = (ListenableFuture<V>) ImmediateFuture.NULL;
          return typedNull;
        }
        return new ImmediateFuture<>(value);
      }
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
Back to top