Class StepList
- java.lang.Object
-
- pl.put.poznan.sqc.domain.scenario.StepList
-
- All Implemented Interfaces:
Component
,StepCollection
,Visitable
public class StepList extends Object implements Component, StepCollection
A Sub-Scenario; a collection of Components.It is made of one main step that is an element of the higher (Sub-)Scenario and a list of Components that represent the sub-scenario's elements.
- See Also:
Step
,Scenario
,Component
,StepCollection
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(Visitor visitor)
Give the visitor information about the current instance and pass it to all the items in the StepList.void
add(Component item)
Add an item to the StepList.ArrayList<Component>
getChildren()
Get all the items in the StepList.Step
getMainStep()
Access the main Step of the StepList.void
remove(Component item)
Remove an item from the StepList.void
setMainStep(Step step)
Deprecated.main step will be final and set by constructorstatic StepList
withNoMain()
Deprecated.
-
-
-
Constructor Detail
-
StepList
public StepList(Step mainStep)
A Sub-Scenario—a list of Steps in a Scenario. Can be nested, i.e., other StepLists can constitute a StepList. It is a composite of Components.
-
StepList
public StepList(String mainStepText)
A Sub-Scenario—a list of Steps in a Scenario. Can be nested, i.e., other StepLists can constitute a StepList. It is a composite of Components.
-
-
Method Detail
-
withNoMain
public static StepList withNoMain()
Deprecated.
-
getChildren
public ArrayList<Component> getChildren()
Get all the items in the StepList.- Returns:
- ArrayList of Components: items in the list
- See Also:
Component
-
add
public void add(Component item)
Add an item to the StepList.- Specified by:
add
in interfaceStepCollection
- Parameters:
item
- Component to be added- See Also:
Component
-
remove
public void remove(Component item)
Remove an item from the StepList.- Specified by:
remove
in interfaceStepCollection
- Parameters:
item
- Component to be removed.- See Also:
Component
-
getMainStep
public Step getMainStep()
Access the main Step of the StepList.- Returns:
- the main step
- See Also:
Step
-
setMainStep
public void setMainStep(Step step)
Deprecated.main step will be final and set by constructor- Parameters:
step
- a new main step
-
accept
public void accept(Visitor visitor)
Give the visitor information about the current instance and pass it to all the items in the StepList.- Specified by:
accept
in interfaceVisitable
- Parameters:
visitor
- Visitor to give information to.- See Also:
Visitor
,Scenario.accept(Visitor)
,Step.accept(Visitor)
-
-