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