- java.lang.Object
-
- net.finmath.concurrency.FutureWrapper<V>
-
- Type Parameters:
V
- The result type returned by this Future's get method.
- All Implemented Interfaces:
Future<V>
public class FutureWrapper<V> extends Object implements Future<V>
Implementation of the Future interface, without any concurrent execution. This wrapper comes handy, if we want to represent the result of a direct (blocking) valuation as a future to replace concurrent valuation.- Version:
- 1.0
- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description FutureWrapper(V object)
Create a wrapper to an object that looks like a Future on that object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
V
get()
V
get(long arg0, TimeUnit arg1)
boolean
isCancelled()
boolean
isDone()
-
-
-
Constructor Detail
-
FutureWrapper
public FutureWrapper(V object)
Create a wrapper to an object that looks like a Future on that object.- Parameters:
object
- Object to wrap.
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<V>
-
-