Package step.core.plans.builder
Class PlanBuilder
- java.lang.Object
-
- step.core.plans.builder.PlanBuilder
-
public class PlanBuilder extends java.lang.Object
This class provides an API for the creation ofPlan
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractArtefact
root
protected java.util.Stack<AbstractArtefact>
stack
-
Constructor Summary
Constructors Constructor Description PlanBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanBuilder
add(AbstractArtefact artefact)
Adds a node to the current parentPlan
build()
static PlanBuilder
create()
PlanBuilder
endBlock()
Removes the current parent from the stack and switch back to the previous parentPlanBuilder
startBlock(AbstractArtefact artefact)
Adds a node to the current parent and defines it as the new current parent
-
-
-
Field Detail
-
root
protected AbstractArtefact root
-
stack
protected java.util.Stack<AbstractArtefact> stack
-
-
Method Detail
-
create
public static PlanBuilder create()
-
add
public PlanBuilder add(AbstractArtefact artefact)
Adds a node to the current parent- Parameters:
artefact
- theAbstractArtefact
to be added- Returns:
- this instance of the
PlanBuilder
-
startBlock
public PlanBuilder startBlock(AbstractArtefact artefact)
Adds a node to the current parent and defines it as the new current parent- Parameters:
artefact
- theAbstractArtefact
to be added and set as current parent- Returns:
- this instance of the
PlanBuilder
-
endBlock
public PlanBuilder endBlock()
Removes the current parent from the stack and switch back to the previous parent- Returns:
- this instance of the
PlanBuilder
-
-