Package VASSAL.tools.concurrent
Interface SettableFuture<V>
- All Superinterfaces:
Future<V>
- All Known Subinterfaces:
SettableRunnableFuture<V>
- All Known Implementing Classes:
EDTRunnableFuture,SimpleFuture,SimpleRunnableFuture
public interface SettableFuture<V> extends Future<V>
A
Future which provides methods for setting its result.- Since:
- author Joel Uckelman, 3.2.0
-
Method Summary
Modifier and Type Method Description voidset(V r)Sets the result to be returned byFuture.get().voidsetException(Throwable t)Sets the exception to be wrapped in anExecutionExceptionand thrown byFuture.get().
-
Method Details
-
setException
Sets the exception to be wrapped in anExecutionExceptionand thrown byFuture.get(). May be called only from the thread executing the computation.- Parameters:
t- the exception
-
set
Sets the result to be returned byFuture.get(). May be called only from the thread executing the computation.- Parameters:
r- the result
-