|
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.StringOption
A String option for use with ArgumentParser. A String option may have a default value. If specified on the command line, a string option takes the value of the argument immediately following its flag.
Constructor Summary | |
StringOption(String flag,
String name,
String description)
Initialize a new String argument with the given flag and description but without a default value. |
|
StringOption(String flag,
String name,
String defaultValue,
String description)
|
|
StringOption(String flag,
String shortCut,
String name,
String defaultValue,
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. |
String |
getValue()
Return the string 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 StringOption(String flag, String name, String description)
public StringOption(String flag, String name, String defaultValue, String description)
public StringOption(String flag, String shortCut, String name, String defaultValue, String description)
Method Detail |
public String getValue()
public int parse(List values) throws MissingArgumentException
parse
in interface Option
MissingArgumentException
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 |