net.dpml.cli.builder
public class ArgumentBuilder extends Object
Version: @PROJECT-VERSION@
Constructor Summary | |
---|---|
ArgumentBuilder()
Creates a new ArgumentBuilder instance |
Method Summary | |
---|---|
Argument | create()
Creates a new Argument instance using the options specified in this
ArgumentBuilder.
|
ArgumentBuilder | reset()
Resets the ArgumentBuilder to the defaults for a new Argument. |
ArgumentBuilder | withConsumeRemaining(String newConsumeRemaining)
Sets the "consume remaining" option, defaults to "--". |
ArgumentBuilder | withDefault(Object defaultValue)
Sets the default value.
|
ArgumentBuilder | withDefaults(List newDefaultValues)
Sets the default values.
|
ArgumentBuilder | withDescription(String newDescription)
Sets the description of the argument.
|
ArgumentBuilder | withId(int newId)
Sets the id
|
ArgumentBuilder | withInitialSeparator(char newInitialSeparator)
Sets the character used to separate the values from the option. |
ArgumentBuilder | withMaximum(int newMaximum)
Sets the maximum number of values allowed for the argument to be valid.
|
ArgumentBuilder | withMinimum(int newMinimum)
Sets the minimum number of values needed for the argument to be valid.
|
ArgumentBuilder | withName(String newName)
Sets the name of the argument. |
ArgumentBuilder | withSubsequentSeparator(char newSubsequentSeparator)
Sets the character used to separate the values from each other. |
ArgumentBuilder | withValidator(Validator newValidator)
Sets the validator instance used to perform validation on the Argument
values.
|
Returns: A new Argument instance using the options specified in this ArgumentBuilder.
Returns: the argument builder
Parameters: newConsumeRemaining the string to use for the consume remaining option
Returns: this ArgumentBuilder
Parameters: defaultValue the default value for the Argument
Returns: this ArgumentBuilder
Parameters: newDefaultValues the default values for the Argument
Returns: this ArgumentBuilder
Parameters: newDescription a description of the argument
Returns: this ArgumentBuilder
Parameters: newId the id of the Argument
Returns: this ArgumentBuilder
Parameters: newInitialSeparator the character used to separate the values from the option
Returns: this ArgumentBuilder
Parameters: newMaximum the number of values allowed
Returns: this ArgumentBuilder
Parameters: newMinimum the number of values needed
Returns: this ArgumentBuilder
Parameters: newName the name of the argument
Returns: this ArgumentBuilder
Parameters: newSubsequentSeparator the character used to separate the values from each other
Returns: this ArgumentBuilder
Parameters: newValidator a Validator instance
Returns: this ArgumentBuilder