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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the result to be returned byFuture.get()
.void
Sets the exception to be wrapped in anExecutionException
and thrown byFuture.get()
.
-
Method Details
-
setException
Sets the exception to be wrapped in anExecutionException
and 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
-