|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.dpml.cli.builder.SwitchBuilder
public class SwitchBuilder
Builds Switch instance.
Constructor Summary | |
---|---|
SwitchBuilder()
Creates a new SwitchBuilder using defaults. |
|
SwitchBuilder(String enabledPrefix,
String disabledPrefix)
Creates a new SwitchBuilder |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwitchBuilder()
Switch.DEFAULT_ENABLED_PREFIX
,
Switch.DEFAULT_DISABLED_PREFIX
public SwitchBuilder(String enabledPrefix, String disabledPrefix) throws IllegalArgumentException
enabledPrefix
- the prefix to use for enabling the optiondisabledPrefix
- the prefix to use for disabling the option
IllegalArgumentException
- if either prefix is less than 1
character long or the prefixes matchMethod Detail |
---|
public Switch create()
public SwitchBuilder reset()
public SwitchBuilder withDescription(String newDescription)
newDescription
- the description to use
public SwitchBuilder withName(String name)
name
- the name to use
public SwitchBuilder withRequired(boolean newRequired)
newRequired
- true iff the Option is required
public SwitchBuilder withArgument(Argument newArgument)
newArgument
- the argument to use
public SwitchBuilder withChildren(Group newChildren)
newChildren
- the child Group to use
public final SwitchBuilder withId(int newId)
newId
- the id of the Switch
public final SwitchBuilder withSwitchDefault(Boolean newSwitchDefault)
newSwitchDefault
- the default state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |