public class DefaultOptionBuilder extends java.lang.Object
| Constructor and Description |
|---|
DefaultOptionBuilder()
Creates a new DefaultOptionBuilder using defaults
|
DefaultOptionBuilder(java.lang.String shortPrefix,
java.lang.String longPrefix,
boolean burstEnabled)
Creates a new DefaultOptionBuilder
|
| Modifier and Type | Method and Description |
|---|---|
DefaultOption |
create()
Creates a DefaultOption instance
|
DefaultOptionBuilder |
reset()
Resets the builder.
|
DefaultOptionBuilder |
withArgument(Argument newArgument)
Use this Argument
|
DefaultOptionBuilder |
withChildren(Group newChildren)
Use this child Group
|
DefaultOptionBuilder |
withDescription(java.lang.String newDescription)
Use this option description
|
DefaultOptionBuilder |
withId(int newId)
Sets the id
|
DefaultOptionBuilder |
withLongName(java.lang.String longName)
Use this long option name.
|
DefaultOptionBuilder |
withRequired(boolean newRequired)
Use this optionality
|
DefaultOptionBuilder |
withShortName(java.lang.String shortName)
Use this short option name.
|
public DefaultOptionBuilder()
public DefaultOptionBuilder(java.lang.String shortPrefix, java.lang.String longPrefix, boolean burstEnabled) throws java.lang.IllegalArgumentException
shortPrefix - the prefix to use for short optionslongPrefix - the prefix to use for long optionsburstEnabled - whether to allow gnu style burstingjava.lang.IllegalArgumentException - if either prefix is less than on
character longpublic DefaultOption create() throws java.lang.IllegalStateException
java.lang.IllegalStateException - if no names have been suppliedpublic DefaultOptionBuilder reset()
DefaultOptionBuilder.public DefaultOptionBuilder withShortName(java.lang.String shortName)
shortName - the name to usepublic DefaultOptionBuilder withLongName(java.lang.String longName)
longName - the name to usepublic DefaultOptionBuilder withDescription(java.lang.String newDescription)
newDescription - the description to usepublic DefaultOptionBuilder withRequired(boolean newRequired)
newRequired - true iff the Option is requiredpublic DefaultOptionBuilder withChildren(Group newChildren)
newChildren - the child Group to usepublic DefaultOptionBuilder withArgument(Argument newArgument)
newArgument - the argument to usepublic final DefaultOptionBuilder withId(int newId)
newId - the id of the DefaultOption