|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpt.ua.concurrent.Future<T>
public class Future<T>
Actor's Futures class.
This class handles future results from actor routines.
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java
assert.
Constructor Summary | |
---|---|
Future(boolean isFunction)
Constructs a new future (either for a function or a procedure). |
Method Summary | |
---|---|
void |
done()
Waits until the actor's routine attached to this future is done. |
boolean |
isFunction()
Is this future applied to a function? |
T |
result()
The result of the actor's function attached to this future. |
void |
setResult(T res)
Sets the result of the actor's function attached to this future. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Future(boolean isFunction)
isFunction
- true if is a function future (with a result), or false for a procedureMethod Detail |
---|
public boolean isFunction()
boolean
true if is a function future, otherwise it is a procedure futurepublic void done()
public T result()
requires: isFunction()
T
the function's resultpublic void setResult(T res)
requires: isFunction()
res
- the function's result
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |