public abstract class FutureConverter<T,V>
extends Object
implements Future<T>
Constructor and Description |
---|
FutureConverter(Future<V> future) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected abstract T |
convert(V v) |
T |
get() |
T |
get(long timeout,
TimeUnit timeUnit) |
boolean |
isCancelled() |
boolean |
isDone() |
public FutureConverter(Future<V> future)
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<T>
public T get() throws ExecutionException, InterruptedException
get
in interface Future<T>
ExecutionException
InterruptedException
public T get(long timeout, TimeUnit timeUnit) throws ExecutionException, InterruptedException, TimeoutException
get
in interface Future<T>
ExecutionException
InterruptedException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<T>
public boolean isDone()
isDone
in interface Future<T>