@PublicAPI public class OptionDescriptor extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BOOL
Boolean option.
|
static int |
NONNEGATIVE_REAL
Positive real number.
|
Constructor and Description |
---|
OptionDescriptor(java.lang.String name,
java.lang.String invname,
int type,
java.lang.String desc,
java.lang.String[] disable,
java.lang.String[] enable,
java.lang.String[] deselect)
Creates an option.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Gets the description.
|
java.lang.String |
getInverseName()
Gets the inverse option name.
|
java.lang.String |
getName()
Gets the option name.
|
java.lang.String[] |
getOptionsToDeselect()
Gets the options that must be deselected if this option is selected.
|
java.lang.String[] |
getOptionsToDisable()
Gets the options that must be switched off if this option is selected.
|
java.lang.String[] |
getOptionsToEnable()
Gets the options that must be switched off if this option is selected.
|
int |
getType()
Gets the option type.
|
boolean |
isDefaultSelected()
Tests whether the option is selected by default.
|
static int |
parseType(java.lang.String s)
Parses an option type from a string.
|
java.lang.String |
toString()
Overrides Object.toString() to ease debugging.
|
public static final int BOOL
public static final int NONNEGATIVE_REAL
public OptionDescriptor(java.lang.String name, java.lang.String invname, int type, java.lang.String desc, java.lang.String[] disable, java.lang.String[] enable, java.lang.String[] deselect)
name
- the option nameinvname
- the inverse option name if the default state is on,
null
otherwisetype
- the typedesc
- the descriptiondisable
- array of options to disableenable
- array of options to enabledeselect
- array of options to deselectpublic java.lang.String getName()
public java.lang.String getInverseName()
public boolean isDefaultSelected()
true
if the option is selected by default,
false
otherwisepublic int getType()
public java.lang.String getDescription()
public java.lang.String[] getOptionsToDisable()
public java.lang.String[] getOptionsToEnable()
public java.lang.String[] getOptionsToDeselect()
public static int parseType(java.lang.String s)
s
- the string ("BOOL" or "NONNEGATIVE_REAL")public java.lang.String toString()
@
', the unsigned
hexadecimal representation of the hash code of the object
and the option name in square brackets.toString
in class java.lang.Object