public class SwitchBuilder extends Object
| Constructor and Description |
|---|
SwitchBuilder()
Creates a new SwitchBuilder using defaults.
|
SwitchBuilder(String enabledPrefix,
String disabledPrefix)
Creates a new SwitchBuilder
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public SwitchBuilder()
public SwitchBuilder(String enabledPrefix, String disabledPrefix) throws IllegalArgumentException
enabledPrefix - the prefix to use for enabling the optiondisabledPrefix - the prefix to use for disabling the optionIllegalArgumentException - if either prefix is less than 1
character long or the prefixes matchpublic SwitchBuilder reset()
public SwitchBuilder withDescription(String newDescription)
newDescription - the description to usepublic SwitchBuilder withName(String name)
name - the name to usepublic SwitchBuilder withRequired(boolean newRequired)
newRequired - true iff the Option is requiredpublic SwitchBuilder withArgument(Argument newArgument)
newArgument - the argument to usepublic SwitchBuilder withChildren(Group newChildren)
newChildren - the child Group to usepublic final SwitchBuilder withId(int newId)
newId - the id of the Switchpublic final SwitchBuilder withSwitchDefault(Boolean newSwitchDefault)
newSwitchDefault - the default stateCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.