Option
, java.io.Serializable
AbstractClassOption
, AbstractClassOption
, FlagOption
, FloatOption
, IntOption
, ListOption
, MultiChoiceOption
, StringOption
public abstract class AbstractOption extends java.lang.Object implements Option
Modifier and Type | Field | Description |
---|---|---|
protected char |
cliChar |
Command line interface text of this option.
|
static char[] |
illegalNameCharacters |
Array of characters not valid to use in option names.
|
protected java.lang.String |
name |
Name of this option.
|
protected java.lang.String |
purpose |
Text of the purpose of this option.
|
Constructor | Description |
---|---|
AbstractOption(java.lang.String name,
char cliChar,
java.lang.String purpose) |
Creates a new instance of an abstract option given its class name,
command line interface text and its purpose.
|
Modifier and Type | Method | Description |
---|---|---|
Option |
copy() |
Gets a copy of this option
|
char |
getCLIChar() |
Gets the Command Line Interface text of this option
|
java.lang.String |
getName() |
Gets the name of this option
|
java.lang.String |
getPurpose() |
Gets the purpose of this option
|
java.lang.String |
getStateString() |
Gets the state of this option in human readable form
|
static boolean |
nameIsLegal(java.lang.String optionName) |
Gets whether the name is valid or not.
|
void |
resetToDefault() |
Resets this option to the default value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultCLIString, getValueAsCLIString, setValueViaCLIString
public static final char[] illegalNameCharacters
protected java.lang.String name
protected char cliChar
protected java.lang.String purpose
public AbstractOption(java.lang.String name, char cliChar, java.lang.String purpose)
name
- the name of this optioncliChar
- the command line interface textpurpose
- the text describing the purpose of this optionpublic static boolean nameIsLegal(java.lang.String optionName)
optionName
- the name of the optionpublic java.lang.String getName()
Option
public char getCLIChar()
Option
getCLIChar
in interface Option
public java.lang.String getPurpose()
Option
getPurpose
in interface Option
public void resetToDefault()
Option
resetToDefault
in interface Option
public java.lang.String getStateString()
Option
getStateString
in interface Option
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.