public class StringOption extends Option
Modifier and Type | Field and Description |
---|---|
protected String |
defaultValue |
protected String |
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 |
StringOption(OptionSet set,
String name,
String desc,
String defaultValue)
Create a new string option.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultValue()
Read the default value of the option
|
String |
getValue()
Read the current value of the option.
|
void |
setDefaultValue(String value)
Modify the default value of the option.
|
void |
setValue(String value)
Update the value of the option, echoing the change if the echoOptions
option is set.
|
protected String defaultValue
protected StringOption(OptionSet set, String name, String desc, String 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 String getDefaultValue()
public void setValue(String value)
value
- The new value for the option.public void setDefaultValue(String value)
value
- The new default value for the option.