public class Options extends AbstractMOAObject
Modifier and Type | Field and Description |
---|---|
protected List<Option> |
optionList |
Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
void |
addOption(Option opt) |
String |
getAsCLIString() |
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
void |
getHelp(StringBuilder sb,
int indent) |
String |
getHelpString() |
Option |
getOption(char cliChar) |
Option |
getOption(String optName) |
Option[] |
getOptionArray() |
int |
numOptions() |
void |
removeAllOptions() |
void |
removeOption(Option opt) |
void |
removeOption(String optName) |
void |
resetToDefaults() |
void |
setViaCLIString(String cliString) |
protected static String[] |
splitParameterFromRemainingOptions(String cliString)
Internal method that splits a string into two parts - the parameter for
the current option, and the remaining options.
|
copy, copy, measureByteSize, measureByteSize, toString
public void addOption(Option opt)
public int numOptions()
public Option getOption(char cliChar)
public Option[] getOptionArray()
public void removeOption(String optName)
public void removeOption(Option opt)
public void removeAllOptions()
public void resetToDefaults()
public void setViaCLIString(String cliString)
public String getAsCLIString()
public String getHelpString()
public void getHelp(StringBuilder sb, int indent)
protected static String[] splitParameterFromRemainingOptions(String cliString)
cliString
- the command line string, beginning at an option parameterpublic void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.