Package com.github.javacliparser
Class MultiChoiceOption
- java.lang.Object
-
- com.github.javacliparser.AbstractOption
-
- com.github.javacliparser.MultiChoiceOption
-
- All Implemented Interfaces:
Option
,Serializable
- Direct Known Subclasses:
EditableMultiChoiceOption
public class MultiChoiceOption extends AbstractOption
Multi choice option.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
chosenOptionIndex
protected int
defaultOptionIndex
protected String[]
optionDescriptions
protected String[]
optionLabels
-
Fields inherited from class com.github.javacliparser.AbstractOption
cliChar, illegalNameCharacters, name, purpose
-
-
Constructor Summary
Constructors Constructor Description MultiChoiceOption(String name, char cliChar, String purpose, String[] optionLabels, String[] optionDescriptions, int defaultOptionIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getChosenIndex()
String
getChosenLabel()
String
getDefaultCLIString()
Gets the Command Line Interface textint
getDefaultOptionIndex()
String[]
getOptionDescriptions()
String[]
getOptionLabels()
String
getValueAsCLIString()
Gets the value of a Command Line Interface text as a stringvoid
setChosenIndex(int index)
void
setChosenLabel(String label)
void
setValueViaCLIString(String s)
Sets value of this option via the Command Line Interface text-
Methods inherited from class com.github.javacliparser.AbstractOption
copy, getCLIChar, getName, getPurpose, getStateString, nameIsLegal, resetToDefault
-
-
-
-
Method Detail
-
getDefaultCLIString
public String getDefaultCLIString()
Description copied from interface:Option
Gets the Command Line Interface text- Returns:
- the Command Line Interface text
-
getValueAsCLIString
public String getValueAsCLIString()
Description copied from interface:Option
Gets the value of a Command Line Interface text as a string- Returns:
- the string with the value of the Command Line Interface text
-
setValueViaCLIString
public void setValueViaCLIString(String s)
Description copied from interface:Option
Sets value of this option via the Command Line Interface text- Parameters:
s
- the Command Line Interface text
-
setChosenLabel
public void setChosenLabel(String label)
-
setChosenIndex
public void setChosenIndex(int index)
-
getOptionLabels
public String[] getOptionLabels()
-
getOptionDescriptions
public String[] getOptionDescriptions()
-
getDefaultOptionIndex
public int getDefaultOptionIndex()
-
getChosenLabel
public String getChosenLabel()
-
getChosenIndex
public int getChosenIndex()
-
-