|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.dpml.cli.builder.ArgumentBuilder
Builds Argument instances.
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArgumentBuilder()
| Method Detail |
public final Argument create()
public final ArgumentBuilder reset()
public final ArgumentBuilder withName(String newName)
newName - the name of the argument
CommandLine.getValue(String)public final ArgumentBuilder withDescription(String newDescription)
newDescription - a description of the argument
public final ArgumentBuilder withMinimum(int newMinimum)
newMinimum - the number of values needed
public final ArgumentBuilder withMaximum(int newMaximum)
newMaximum - the number of values allowed
public final ArgumentBuilder withInitialSeparator(char newInitialSeparator)
newInitialSeparator - the character used to separate the values
from the option
public final ArgumentBuilder withSubsequentSeparator(char newSubsequentSeparator)
newSubsequentSeparator - the character used to separate the values
from each other
public final ArgumentBuilder withValidator(Validator newValidator)
newValidator - a Validator instance
public final ArgumentBuilder withConsumeRemaining(String newConsumeRemaining)
newConsumeRemaining - the string to use for the consume
remaining option
public final ArgumentBuilder withDefault(Object defaultValue)
defaultValue - the default value for the Argument
public final ArgumentBuilder withDefaults(List newDefaultValues)
newDefaultValues - the default values for the Argument
public final ArgumentBuilder withId(int newId)
newId - the id of the Argument
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||