|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.charliedog.argv.NumberArgument
A Number argument for use with ArgumentParser. A Number argument may have a default value. If specified on the command line, a Number argument takes the value of the argument immediately following its flag.
| Constructor Summary | |
NumberArgument(java.lang.String flag,
java.math.BigDecimal defaultValue,
java.lang.String description)
Initialize a new Number argument with the given flag, description, and default value. |
|
NumberArgument(java.lang.String flag,
java.lang.String description)
Initialize a new Number argument with the given flag and description but without a default value. |
|
| Method Summary | |
java.math.BigDecimal |
getValue()
Return the 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 NumberArgument(java.lang.String flag,
java.lang.String description)
public NumberArgument(java.lang.String flag,
java.math.BigDecimal defaultValue,
java.lang.String description)
| Method Detail |
public java.math.BigDecimal getValue()
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 | |||||||||