Interface Parameter.SequenceBuilder
- All Superinterfaces:
AbstractBuilder<Parameter.Multi>,Builder<Parameter.Multi,,Parameter.SequenceBuilder> ResettableBuilder<Parameter.Multi,Parameter.SequenceBuilder>
- Enclosing interface:
- Parameter
public static interface Parameter.SequenceBuilder
extends Builder<Parameter.Multi,Parameter.SequenceBuilder>
Specifies a builder for creating a
Parameter that returns a
parameter that concatenates all parameters into a single
parameter to be executed one by one.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates aParameterfrom the builder.optional()Sets that this parameter is weak optional and will be ignored if it cannot parse the next element(s).terminal()Sets that this sequence of parameters is optional, and will be ignored if it isn't specified - but will throw an error if this is passed something to parse that it cannot parse.default Parameter.SequenceBuilderAdds a set ofParameters to this builder.Defines the next parameter in the parameter sequence.default Parameter.SequenceBuilderAdds a set ofParameters to this builder.
-
Method Details
-
terminal
Parameter.SequenceBuilder terminal()Sets that this sequence of parameters is optional, and will be ignored if it isn't specified - but will throw an error if this is passed something to parse that it cannot parse.- Returns:
- This builder, for chaining
-
optional
Parameter.SequenceBuilder optional()Sets that this parameter is weak optional and will be ignored if it cannot parse the next element(s).- Returns:
- This builder, for chaining
-
then
Defines the next parameter in the parameter sequence.- Parameters:
parameter- The parameter- Returns:
- This builder, for chaining
-
then
Adds a set ofParameters to this builder.The parameters will be parsed in the provided order.
- Parameters:
parameters- The parameters to add- Returns:
- This builder, for chaining
-
then
Adds a set ofParameters to this builder.The parameters will be parsed in the provided order.
- Parameters:
parameters- The parameters to add- Returns:
- This builder, for chaining
-
build
Parameter.Multi build()Creates aParameterfrom the builder.- Specified by:
buildin interfaceAbstractBuilder<Parameter.Multi>- Returns:
- The
Parameter
-