|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.util.argv.NumberOption
A Number option for use with ArgumentParser. A Number option may have a default value. If specified on the command line, a Number option takes the value of the argument immediately following its flag.
Constructor Summary | |
NumberOption(String flag,
String name,
BigDecimal defaultValue,
String description)
|
|
NumberOption(String flag,
String name,
String description)
|
|
NumberOption(String flag,
String shortCut,
String name,
BigDecimal defaultValue,
String description)
|
|
NumberOption(String flag,
String shortCut,
String name,
String description)
|
Method Summary | |
String |
getOption()
Must return the flag and parameters of this option. |
String |
getUsage()
Must return a description of the usage of this option. |
BigDecimal |
getValue()
Return the value of this argument, which may be null. |
int |
parse(List values)
Parsing method invoked by ArgumentParser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NumberOption(String flag, String name, String description)
public NumberOption(String flag, String shortCut, String name, String description)
public NumberOption(String flag, String name, BigDecimal defaultValue, String description)
public NumberOption(String flag, String shortCut, String name, BigDecimal defaultValue, String description)
Method Detail |
public BigDecimal getValue()
public int parse(List values) throws MissingArgumentException, ArgumentFormatException
parse
in interface Option
MissingArgumentException
ArgumentFormatException
public String getOption()
Option
getOption
in interface Option
public String getUsage()
Option
getUsage
in interface Option
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |