|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdatabionics.cli.PropertyCommandLine
public class PropertyCommandLine
Command line options class enhanced with default values from system properties.
| Constructor Summary | |
|---|---|
PropertyCommandLine(org.apache.commons.cli.CommandLine cmd,
PropertyOptions options)
Creates an PropertyCommandLine using the specified parameters. |
|
| Method Summary | |
|---|---|
java.lang.String |
getOptionValue(java.lang.String opt)
Retrieve the argument, if any, of this option. |
java.lang.String |
getOptionValue(java.lang.String opt,
java.lang.String def)
Retrieve the argument, if any, of this option. |
double |
getOptionValueAsDouble(java.lang.String opt,
double def)
Retrieve the argument as double |
int |
getOptionValueAsInt(java.lang.String opt,
int def)
Retrieve the argument as int |
boolean |
hasOption(java.lang.String opt)
Query to see if an option has been set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyCommandLine(org.apache.commons.cli.CommandLine cmd,
PropertyOptions options)
cmd - parsed command lineoptions - original property options| Method Detail |
|---|
public java.lang.String getOptionValue(java.lang.String opt)
Retrieve the argument, if any, of this option.
opt - the name of the option
public java.lang.String getOptionValue(java.lang.String opt,
java.lang.String def)
Retrieve the argument, if any, of this option.
opt - the name of the optiondef - the default value of the option
public int getOptionValueAsInt(java.lang.String opt,
int def)
Retrieve the argument as int
opt - the name of the optiondef - the default value if parsing fails
public double getOptionValueAsDouble(java.lang.String opt,
double def)
Retrieve the argument as double
opt - the name of the optiondef - the default value if parsing fails
public boolean hasOption(java.lang.String opt)
Query to see if an option has been set.
opt - Short name of the option
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||