Class AutoSerialStepGroup

java.lang.Object
org.wildstang.framework.auto.AutoStep
org.wildstang.framework.auto.steps.AutoSerialStepGroup

public class AutoSerialStepGroup extends AutoStep
Serial groups execute all contained steps sequentially.
  • Constructor Details

    • AutoSerialStepGroup

      public AutoSerialStepGroup()
      Allow empty constructors since groups contain steps anyway.
    • AutoSerialStepGroup

      public AutoSerialStepGroup(String name)
      Constructor takes a name since there may be multiple groups.
      Parameters:
      name - Name for the step group.
  • Method Details

    • initialize

      public void initialize()
      Initializes each step in the group.
      Specified by:
      initialize in class AutoStep
    • update

      public void update()
      Updates the current step in the group until it is finished. Then moves on to the next step. Group is finished when last step is finished.
      Specified by:
      update in class AutoStep
    • addStep

      public void addStep(AutoStep step)
      Add a step to the group if it is not initialized.
      Parameters:
      step - Step to add to the group.
    • toString

      public String toString()
      Group name is used in conjuction with "Serial step group: "
      Specified by:
      toString in class AutoStep
      Returns:
      Name of the group.
    • getCurrentStep

      public AutoStep getCurrentStep()
      Gets the current executing AutoStep.
      Returns:
      The current AutoStep.
    • getNextStep

      public AutoStep getNextStep()
      Gets the next AutoStep to execute.
      Returns:
      The next AutoStep to execute of null if none left.