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 Summary
Constructors Constructor Description AutoSerialStepGroup()Allow empty constructors since groups contain steps anyway.AutoSerialStepGroup(java.lang.String name)Constructor takes a name since there may be multiple groups.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStep(AutoStep step)Add a step to the group if it is not initialized.AutoStepgetCurrentStep()Gets the current executing AutoStep.AutoStepgetNextStep()Gets the next AutoStep to execute.voidinitialize()Initializes each step in the group.java.lang.StringtoString()Group name is used in conjuction with "Serial step group: "voidupdate()Updates the current step in the group until it is finished.-
Methods inherited from class org.wildstang.framework.auto.AutoStep
isFinished, setFinished, setFinished
-
-
-
-
Constructor Detail
-
AutoSerialStepGroup
public AutoSerialStepGroup()
Allow empty constructors since groups contain steps anyway.
-
AutoSerialStepGroup
public AutoSerialStepGroup(java.lang.String name)
Constructor takes a name since there may be multiple groups.- Parameters:
name- Name for the step group.
-
-
Method Detail
-
initialize
public void initialize()
Initializes each step in the group.- Specified by:
initializein classAutoStep
-
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.
-
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 java.lang.String toString()
Group name is used in conjuction with "Serial step 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.
-
-