Interface Stage.Builder<DATA>
- Type Parameters:
DATA
- processed data type.
public static interface Stage.Builder<DATA>
Linear stage chain builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a stage chain.Add a terminal stage to the stage chain and build the chain.Add a transformation function as a next stage to the stage chain.to
(ChainableStage<DATA> stage) Add a newchainable stage
as a next stage to the stage chain.
-
Method Details
-
to
Add a transformation function as a next stage to the stage chain.The order of the
to(...)
method invocations matches the order of the stage execution at runtime.- Parameters:
transformation
- a transformation function to be added as a next stage to the stage chain.- Returns:
- updated builder instance.
-
to
Add a newchainable stage
as a next stage to the stage chain.The order of the
to(...)
method invocations matches the order of the stage execution at runtime. A subsequent call to ato(...)
method will automatically invoke theChainableStage.setDefaultNext(Stage)
method on the chainable stage.- Parameters:
stage
- a chainable stage to be added as a next stage to the stage chain.- Returns:
- updated builder instance.
-
build
Build a stage chain.- Returns:
- built acceptor chain.
-
build
Add a terminal stage to the stage chain and build the chain.- Parameters:
terminal
- last stage to be added to the stage chain.- Returns:
- built stage chain.
-