|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.charliedog.argv.PairArgument
A Pair argument, for use with ArgumentParser. A Pair argument 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 | |
PairArgument(java.lang.String flag,
java.lang.String description)
Initialize a new Pair argument. |
|
| Method Summary | |
java.lang.String |
getDestination()
Return the destination value of this argument, which may be null. |
java.lang.String |
getSource()
Return the source value of this argument, which may be null. |
int |
parse(java.util.List values)
Parsing method invoked by ArgumentParser. |
void |
printUsage(java.io.PrintWriter out)
Usage 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 PairArgument(java.lang.String flag,
java.lang.String description)
| Method Detail |
public java.lang.String getSource()
public java.lang.String getDestination()
public int parse(java.util.List values)
parse in interface Argumentpublic void printUsage(java.io.PrintWriter out)
printUsage in interface Argument
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||