Package VASSAL.tools.concurrent
Interface SettableFuture<V>
- All Superinterfaces:
Future<V>
- All Known Subinterfaces:
SettableRunnableFuture<V>
- All Known Implementing Classes:
EDTRunnableFuture,SimpleFuture,SimpleRunnableFuture
A
Future which provides methods for setting its result.- Since:
- author Joel Uckelman, 3.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the result to be returned byFuture.get().voidSets the exception to be wrapped in anExecutionExceptionand thrown byFuture.get().Methods inherited from interface java.util.concurrent.Future
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, state
-
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
-