T - type of "future" object to returnprivate static class FutureSupport.FutureNow<T> extends Object implements Future<T>
Future that returns a value that is
already known.| Constructor and Description |
|---|
FutureSupport.FutureNow(T t)
Constructor.
|
private final T value
FutureSupport.FutureNow(T t)
t - value to be returnedpublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 1999–2016. All rights reserved.