java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.control.IfContext

public class IfContext extends Context
This represents the semantics of the IF-THEN-ELSE controls in an action script.
  • Constructor Details

  • Method Details

    • setStatus

      public void setStatus(ActionStatus eStatus, Justification justification)
      Description copied from class: Context
      Set the ActionStatus and Justification for the status. NOTE: Classes overriding this method must call super.setStatus(status, justification) inside their overriding method to actually set the status and justification. Using the convenience method setStatus(status) will cause an infinite loop, and also abandon the Justification.
      Overrides:
      setStatus in class Context
    • setupNextStep

      protected void setupNextStep()
      Description copied from class: Context
      If Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.
      Overrides:
      setupNextStep in class Context
    • copy

      public IfContext copy(Context newParent)
      Description copied from class: Context
      deep copy of the context, its status, and its children
      Specified by:
      copy in class Context
      Parameters:
      newParent - parent to attach the copied context too
      Returns:
      the copied context