net.dpml.cli.builder
public class SwitchBuilder extends Object
Version: @PROJECT-VERSION@
Constructor Summary | |
---|---|
SwitchBuilder()
Creates a new SwitchBuilder using defaults. | |
SwitchBuilder(String enabledPrefix, String disabledPrefix)
Creates a new SwitchBuilder |
Method Summary | |
---|---|
Switch | create()
Creates a new Switch instance |
SwitchBuilder | reset()
Resets the builder. |
SwitchBuilder | withArgument(Argument newArgument)
Use this Argument |
SwitchBuilder | withChildren(Group newChildren)
Use this child Group |
SwitchBuilder | withDescription(String newDescription)
Use this option description |
SwitchBuilder | withId(int newId)
Sets the id
|
SwitchBuilder | withName(String name)
Use this option name. |
SwitchBuilder | withRequired(boolean newRequired)
Use this optionality |
SwitchBuilder | withSwitchDefault(Boolean newSwitchDefault)
Sets the default state for this switch
|
Parameters: enabledPrefix the prefix to use for enabling the option disabledPrefix the prefix to use for disabling the option
Throws: IllegalArgumentException if either prefix is less than 1 character long or the prefixes match
Returns: a new Switch instance
Returns: the builder
Parameters: newArgument the argument to use
Returns: this builder
Parameters: newChildren the child Group to use
Returns: this builder
Parameters: newDescription the description to use
Returns: this builder
Parameters: newId the id of the Switch
Returns: this SwitchBuilder
Parameters: name the name to use
Returns: this builder
Parameters: newRequired true iff the Option is required
Returns: this builder
Parameters: newSwitchDefault the default state
Returns: this SwitchBuilder