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