Package org.kquiet.browser
Class ActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
java.lang.Object
org.kquiet.browser.ActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
- Enclosing class:
- ActionComposerBuilder.ActionSequenceBuilder
A builder to build
IfThenElse
in a fluent way.-
Constructor Summary
ConstructorsConstructorDescriptionIfThenElseBuilder
(ActionComposerBuilder.ActionSequenceBuilder parentActionSequenceBuilder, Function<ActionComposer, ?> evalFunction) Create a newActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
with specifiedActionComposerBuilder.ActionSequenceBuilder
as parent builder. -
Method Summary
Modifier and TypeMethodDescriptionendIf()
Finish buildingIfThenElse
and add it to parent builder.Start building the action list for the negative result of predicate.Finish building the sequence of actions so far and return control to root builder (ActionComposerBuilder
).then()
Start building the action list for the positive result of predicate.
-
Constructor Details
-
IfThenElseBuilder
public IfThenElseBuilder(ActionComposerBuilder.ActionSequenceBuilder parentActionSequenceBuilder, Function<ActionComposer, ?> evalFunction) Create a newActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
with specifiedActionComposerBuilder.ActionSequenceBuilder
as parent builder.- Parameters:
parentActionSequenceBuilder
- parent builder(ActionComposerBuilder.ActionSequenceBuilder
)evalFunction
- the function to evaluate
-
-
Method Details
-
returnToComposerBuilder
Finish building the sequence of actions so far and return control to root builder (ActionComposerBuilder
).- Returns:
- root builder(
ActionComposerBuilder
)
-
then
Start building the action list for the positive result of predicate.- Returns:
- a new
ActionComposerBuilder.ActionSequenceBuilder
with thisActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
as parent builder
-
otherwise
Start building the action list for the negative result of predicate.- Returns:
- a new
ActionComposerBuilder.ActionSequenceBuilder
with thisActionComposerBuilder.ActionSequenceBuilder.IfThenElseBuilder
as parent builder
-
endIf
Finish buildingIfThenElse
and add it to parent builder.- Returns:
- parent builder(
ActionComposerBuilder.ActionSequenceBuilder
)
-