Class Callables
-
- com.google.common.util.concurrent.Callables
-
@GwtCompatible(emulated=true) public final class Callables extends
Static utility methods pertaining to the interface.- Since:
- 1.0
- Author:
- Isaac Shum
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> AsyncCallable<T>
<T> callable, ListeningExecutorService listeningExecutorService)
Creates an .static <T> <T>
T value)
Creates aCallable
which immediately returns a preset value each time it is called.
-
-
-
Method Detail
-
returning
public static <T> <T> T value)
Creates aCallable
which immediately returns a preset value each time it is called.
-
asAsyncCallable
@Beta @GwtIncompatible public static <T> <T> callable, ListeningExecutorService listeningExecutorService)
Creates an .The
AsyncCallable
returns theListenableFuture
resulting fromListeningExecutorService.submit(Callable)
.- Since:
- 20.0
-
-