|
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.PairOption
A Pair option for use with ArgumentParser. A Pair option has two values, a source and a destination, and is useful for programs which translate (or otherwise process) some input to produce some output. Source and destination could be, for example, either file formats or file names. On the command line, a translate argument consists of a flag followed by the source and destination arguments, in that order:
-<flag> <source> <dest>
Constructor Summary | |
PairOption(String flag,
String name1,
String name2,
String description)
Initialize a new Pair argument. |
|
PairOption(String flag,
String shortCut,
String name1,
String name2,
String description)
|
Method Summary | |
String |
getDestination()
Return the destination value of this argument, which may be null. |
String |
getOption()
Must return the flag and parameters of this option. |
String |
getSource()
Return the source value of this argument, which may be null. |
String |
getUsage()
Must return a description of the usage of this option. |
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 PairOption(String flag, String name1, String name2, String description)
public PairOption(String flag, String shortCut, String name1, String name2, String description)
Method Detail |
public String getSource()
public String getDestination()
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 |