public class BooleanOption extends Option
Modifier and Type | Field and Description |
---|---|
protected boolean |
defaultValue |
protected boolean |
value |
ADDRESS_OPTION, BOOLEAN_OPTION, ENUM_OPTION, FLOAT_OPTION, INT_OPTION, MICROSECONDS_OPTION, PAGES_OPTION, RAW, READABLE, set, STRING_OPTION, XML
Modifier | Constructor and Description |
---|---|
protected |
BooleanOption(OptionSet set,
String name,
String desc,
boolean defaultValue)
Create a new boolean option.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getDefaultValue()
Read the default value of the option.
|
boolean |
getValue()
Read the current value of the option.
|
void |
setDefaultValue(boolean value)
Modify the default value of the option.
|
void |
setValue(boolean value)
Update the value of the option, echoing the change if the echoOptions
option is set.
|
protected boolean defaultValue
protected boolean value
protected BooleanOption(OptionSet set, String name, String desc, boolean defaultValue)
set
- The option set this option belongs to.name
- The space separated name for the option.desc
- The purpose of the optiondefaultValue
- The default value of the option.public boolean getValue()
public boolean getDefaultValue()
public void setValue(boolean value)
value
- The new value for the option.public void setDefaultValue(boolean value)
value
- The new default value for the option.