|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.recur.PendingContinuation<T>
public abstract class PendingContinuation<T>
A continuation representing computation left to be done (in contrast to ValueContinuation,
which represents a completed computation). This class provides default implementations of
value(), isResolved(), and compose(edu.rice.cs.plt.lambda.Lambda super T, ? extends edu.rice.cs.plt.recur.Continuation extends R>>). Subclasses may be defined in one of two
ways:
PendingContinuation, where the step() method wraps the delayed recursive invocation.PendingContinuation. ComposedContinuation is one example.
| Constructor Summary | |
|---|---|
PendingContinuation()
|
|
| Method Summary | ||
|---|---|---|
|
compose(Lambda<? super T,? extends Continuation<? extends R>> c)
Create a ComposedContinuation in terms of this object and the provided function. |
|
boolean |
isResolved()
Return false. |
|
abstract Continuation<? extends T> |
step()
Defines the next step of the continuation. |
|
T |
value()
Iteratively invoke step() until a resolved continuation is produced. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PendingContinuation()
| Method Detail |
|---|
public T value()
step() until a resolved continuation is produced.
value in interface Thunk<T>value in interface Continuation<T>public boolean isResolved()
false.
isResolved in interface ResolvingThunk<T>isResolved in interface Continuation<T>public <R> Continuation<R> compose(Lambda<? super T,? extends Continuation<? extends R>> c)
ComposedContinuation in terms of this object and the provided function.
compose in interface Continuation<T>public abstract Continuation<? extends T> step()
step in interface Continuation<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||