Class BranchTask

java.lang.Object
com.epicbot.api.shared.script.tree.BranchTask
All Implemented Interfaces:
TreeTask

public abstract class BranchTask extends Object implements TreeTask
  • Field Details

  • Constructor Details

  • Method Details

    • createSuccessTask

      protected abstract TreeTask createSuccessTask(APIContext ctx)
      The success task that will be executed when validate() is true.
      Parameters:
      ctx - APIContext
      Returns:
      the success task
    • createFailureTask

      protected abstract TreeTask createFailureTask(APIContext ctx)
      The failure task that will be executed when validate() is false.
      Parameters:
      ctx - APIContext
      Returns:
      the failure task
    • validate

      public abstract boolean validate()
      Returns the condition of this branch.
      Returns:
      boolean
    • execute

      public final void execute()
      Description copied from interface: TreeTask
      Execute this task.
      Specified by:
      execute in interface TreeTask