public class DefaultOptionBuilder extends Object
Constructor and Description |
---|
DefaultOptionBuilder()
Creates a new DefaultOptionBuilder using defaults
|
DefaultOptionBuilder(String shortPrefix,
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(String newDescription)
Use this option description
|
DefaultOptionBuilder |
withId(int newId)
Sets the id
|
DefaultOptionBuilder |
withLongName(String longName)
Use this long option name.
|
DefaultOptionBuilder |
withRequired(boolean newRequired)
Use this optionality
|
DefaultOptionBuilder |
withShortName(String shortName)
Use this short option name.
|
public DefaultOptionBuilder()
public DefaultOptionBuilder(String shortPrefix, String longPrefix, boolean burstEnabled) throws IllegalArgumentException
shortPrefix
- the prefix to use for short optionslongPrefix
- the prefix to use for long optionsburstEnabled
- whether to allow gnu style burstingIllegalArgumentException
- if either prefix is less than on
character longpublic DefaultOption create() throws IllegalStateException
IllegalStateException
- if no names have been suppliedpublic DefaultOptionBuilder reset()
public DefaultOptionBuilder withShortName(String shortName)
shortName
- the name to usepublic DefaultOptionBuilder withLongName(String longName)
longName
- the name to usepublic DefaultOptionBuilder withDescription(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 DefaultOptionCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.