Option
, java.io.Serializable
EditableMultiChoiceOption
public class MultiChoiceOption extends AbstractOption
Modifier and Type | Field | Description |
---|---|---|
protected int |
chosenOptionIndex |
|
protected int |
defaultOptionIndex |
|
protected java.lang.String[] |
optionDescriptions |
|
protected java.lang.String[] |
optionLabels |
cliChar, illegalNameCharacters, name, purpose
Constructor | Description |
---|---|
MultiChoiceOption(java.lang.String name,
char cliChar,
java.lang.String purpose,
java.lang.String[] optionLabels,
java.lang.String[] optionDescriptions,
int defaultOptionIndex) |
Modifier and Type | Method | Description |
---|---|---|
int |
getChosenIndex() |
|
java.lang.String |
getChosenLabel() |
|
java.lang.String |
getDefaultCLIString() |
Gets the Command Line Interface text
|
int |
getDefaultOptionIndex() |
|
java.lang.String[] |
getOptionDescriptions() |
|
java.lang.String[] |
getOptionLabels() |
|
java.lang.String |
getValueAsCLIString() |
Gets the value of a Command Line Interface text as a string
|
void |
setChosenIndex(int index) |
|
void |
setChosenLabel(java.lang.String label) |
|
void |
setValueViaCLIString(java.lang.String s) |
Sets value of this option via the Command Line Interface text
|
copy, getCLIChar, getName, getPurpose, getStateString, nameIsLegal, resetToDefault
protected java.lang.String[] optionLabels
protected java.lang.String[] optionDescriptions
protected int defaultOptionIndex
protected int chosenOptionIndex
public MultiChoiceOption(java.lang.String name, char cliChar, java.lang.String purpose, java.lang.String[] optionLabels, java.lang.String[] optionDescriptions, int defaultOptionIndex)
public java.lang.String getDefaultCLIString()
Option
public java.lang.String getValueAsCLIString()
Option
public void setValueViaCLIString(java.lang.String s)
Option
s
- the Command Line Interface textpublic void setChosenLabel(java.lang.String label)
public void setChosenIndex(int index)
public java.lang.String[] getOptionLabels()
public java.lang.String[] getOptionDescriptions()
public int getDefaultOptionIndex()
public java.lang.String getChosenLabel()
public int getChosenIndex()
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.