Class BranchTask
- java.lang.Object
-
- com.epicbot.api.shared.script.tree.BranchTask
-
-
Field Summary
Fields Modifier and Type Field Description protected APIContext
ctx
-
Constructor Summary
Constructors Constructor Description BranchTask(APIContext ctx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TreeTask
createFailureTask(APIContext ctx)
The failure task that will be executed whenvalidate()
is false.protected abstract TreeTask
createSuccessTask(APIContext ctx)
The success task that will be executed whenvalidate()
is true.void
execute()
Execute this task.abstract boolean
validate()
Returns the condition of this branch.
-
-
-
Field Detail
-
ctx
protected APIContext ctx
-
-
Constructor Detail
-
BranchTask
public BranchTask(APIContext ctx)
-
-
Method Detail
-
createSuccessTask
protected abstract TreeTask createSuccessTask(APIContext ctx)
The success task that will be executed whenvalidate()
is true.- Parameters:
ctx
-APIContext
- Returns:
- the success task
-
createFailureTask
protected abstract TreeTask createFailureTask(APIContext ctx)
The failure task that will be executed whenvalidate()
is false.- Parameters:
ctx
-APIContext
- Returns:
- the failure task
-
validate
public abstract boolean validate()
Returns the condition of this branch.- Returns:
- boolean
-
-