Modifier and Type | Field and Description |
---|---|
protected APIContext |
ctx |
Constructor and Description |
---|
BranchTask(APIContext ctx) |
Modifier and Type | Method and Description |
---|---|
protected abstract TreeTask |
createFailureTask(APIContext ctx)
The failure task that will be executed when
validate() is false. |
protected abstract TreeTask |
createSuccessTask(APIContext ctx)
The success task that will be executed when
validate() is true. |
void |
execute()
Execute this task.
|
abstract boolean |
validate()
Returns the condition of this branch.
|
protected APIContext ctx
public BranchTask(APIContext ctx)
protected abstract TreeTask createSuccessTask(APIContext ctx)
validate()
is true.ctx
- APIContext
protected abstract TreeTask createFailureTask(APIContext ctx)
validate()
is false.ctx
- APIContext
public abstract boolean validate()