public abstract class Conditional<T extends Traverser> extends java.lang.Object implements Node<T>
Node
providing a location
for business logic to be performed. The business logic should represent a kind of boolean logic,
calling either yes(Traverser)
if the logic is true, or no(Traverser)
if it is false.
yes(Traverser)
or no(Traverser)
is called, the workflow will end and no other
nodes will be called.
yes(Traverser)
and no(Traverser)
, as both forks of the workflow will be
executed, i.e. DO NOT do the following:
if(businessLogic(tasks)) {
yes(tasks);
}
no(tasks);
Modifier and Type | Field and Description |
---|---|
protected Node<T> |
noNode |
protected Node<T> |
yesNode |
Constructor and Description |
---|
Conditional() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
evaluate(T tasks) |
protected void |
no(T traverser) |
void |
setNoNode(Node<T> noNode) |
void |
setYesNode(Node<T> yesNode) |
void |
start(T traverser)
Initalizes the business logic for this Node
|
protected void |
yes(T traverser) |