Package com.github.javacliparser
Class FlagOption
- java.lang.Object
-
- com.github.javacliparser.AbstractOption
-
- com.github.javacliparser.FlagOption
-
- All Implemented Interfaces:
Option
,Serializable
public class FlagOption extends AbstractOption
Flag 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 boolean
isSet
-
Fields inherited from class com.github.javacliparser.AbstractOption
cliChar, illegalNameCharacters, name, purpose
-
-
Constructor Summary
Constructors Constructor Description FlagOption(String name, char cliChar, String purpose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultCLIString()
Gets the Command Line Interface textString
getStateString()
Gets the state of this option in human readable formString
getValueAsCLIString()
Gets the value of a Command Line Interface text as a stringboolean
isSet()
void
set()
void
setValue(boolean v)
void
setValueViaCLIString(String s)
Sets value of this option via the Command Line Interface textvoid
unset()
-
Methods inherited from class com.github.javacliparser.AbstractOption
copy, getCLIChar, getName, getPurpose, nameIsLegal, resetToDefault
-
-
-
-
Method Detail
-
setValue
public void setValue(boolean v)
-
set
public void set()
-
unset
public void unset()
-
isSet
public boolean isSet()
-
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
-
getStateString
public String getStateString()
Description copied from interface:Option
Gets the state of this option in human readable form- Specified by:
getStateString
in interfaceOption
- Overrides:
getStateString
in classAbstractOption
- Returns:
- the string with state of this option in human readable form
-
-