public final class Choice<R,M,O> extends Action<R,M,O>
Modifier and Type | Method and Description |
---|---|
<S> Action<S,M,O> |
bind(Action.Continuation<? super R,S,M,O> cont)
Applies a monadic continuation to all leaves of this search tree
(transition operation).
|
static <R,M,O> Choice<R,M,O> |
either(Action<R,M,O> first,
Action<R,M,O> second) |
List<Action<? extends R,M,O>> |
getAlts() |
protected int |
getLeafCount() |
void |
host(Action.Visitor<? super R,M,O> v)
Performs a double dispatch to the appropriate method of a visitor.
|
boolean |
isEmpty()
Checks whether this search tree is empty.
|
<Q> Action<? extends R,M,Q> |
prune()
Simplifies this search tree by removing redundant choice nodes
and all obstructions (transition operation).
|
protected <Q> boolean |
pruneTo(List<? super Action<? extends R,M,Q>> alts)
Adds a pruned variant of this search subtree to a list of choice
alternatives.
|
String |
toString() |
protected int getLeafCount()
getLeafCount
in class Action<R,M,O>
public <S> Action<S,M,O> bind(Action.Continuation<? super R,S,M,O> cont)
Action
public <Q> Action<? extends R,M,Q> prune()
Action
protected <Q> boolean pruneTo(List<? super Action<? extends R,M,Q>> alts)
Action
public boolean isEmpty()
Action
see also the complete user documentation .