Interface Parameter.Subcommand.Builder
-
- All Superinterfaces:
AbstractBuilder<Parameter.Subcommand>
,Buildable.Builder<Parameter.Subcommand>
,Builder<Parameter.Subcommand,Parameter.Subcommand.Builder>
,ResettableBuilder<Parameter.Subcommand,Parameter.Subcommand.Builder>
- Enclosing interface:
- Parameter.Subcommand
public static interface Parameter.Subcommand.Builder extends Builder<Parameter.Subcommand,Parameter.Subcommand.Builder>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Parameter.Subcommand.Builder
addAlias(java.lang.String alias)
Sets an alias for the subcommand.Parameter.Subcommand
build()
Builds this subcommand parameter.Parameter.Subcommand.Builder
subcommand(Command.Parameterized command)
Sets theCommand.Parameterized
to execute for this subcommand.
-
-
-
Method Detail
-
addAlias
Parameter.Subcommand.Builder addAlias(java.lang.String alias)
Sets an alias for the subcommand. This can be executed more than once.- Parameters:
alias
- The alias- Returns:
- This builder, for chaining
-
subcommand
Parameter.Subcommand.Builder subcommand(Command.Parameterized command)
Sets theCommand.Parameterized
to execute for this subcommand.- Parameters:
command
- TheCommand.Parameterized
- Returns:
- This builder, for chaining.
-
build
Parameter.Subcommand build()
Builds this subcommand parameter.An alias and the command must be set, else a
IllegalStateException
will be thrown.- Specified by:
build
in interfaceAbstractBuilder<Parameter.Subcommand>
- Specified by:
build
in interfaceBuildable.Builder<Parameter.Subcommand>
- Returns:
- The
Parameter.Subcommand
-
-