|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.cli.Option
gov.nasa.pds.tools.options.ToolsOption
public class ToolsOption
Class that extends Apache's Option class. Provides a simpler interface to build command-line option flags.
Field Summary |
---|
Fields inherited from class org.apache.commons.cli.Option |
---|
UNINITIALIZED, UNLIMITED_VALUES |
Constructor Summary | |
---|---|
ToolsOption(java.lang.String opt,
java.lang.String longOpt,
java.lang.String description)
Contstructor. |
Method Summary | |
---|---|
void |
hasArg(java.lang.String name,
java.lang.Object type)
Requires a single argument to follow the option. |
void |
hasArg(java.lang.String name,
java.lang.Object type,
boolean isOptional)
Allows a single argument to be passed into the option. |
void |
hasArgs(int numArgs,
java.lang.String name,
java.lang.Object type,
char separator,
boolean isOptional)
Defines an argument's "properties" for an option. |
void |
hasArgs(java.lang.String name,
java.lang.Object type)
Requires an argument to follow the option. |
void |
hasArgs(java.lang.String name,
java.lang.Object type,
char separator)
Requires an argument to follow the option. |
void |
hasArgs(java.lang.String name,
java.lang.Object type,
char separator,
boolean isOptional)
Allows multiple arguments to be passed in to the option. |
Methods inherited from class org.apache.commons.cli.Option |
---|
addValue, clone, getArgName, getArgs, getDescription, getId, getLongOpt, getOpt, getType, getValue, getValue, getValue, getValues, getValueSeparator, getValuesList, hasArg, hasArgName, hasArgs, hasLongOpt, hasOptionalArg, isRequired, setArgName, setArgs, setLongOpt, setOptionalArg, setRequired, setType, setValueSeparator, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ToolsOption(java.lang.String opt, java.lang.String longOpt, java.lang.String description)
opt
- Short name of the option.longOpt
- Long name of the option. Can be set to 'null'.description
- Description of the option.Method Detail |
---|
public void hasArg(java.lang.String name, java.lang.Object type)
name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.public void hasArg(java.lang.String name, java.lang.Object type, boolean isOptional)
name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.isOptional
- Set to 'true' if the argument is optional, 'false' otherwise.public void hasArgs(java.lang.String name, java.lang.Object type)
name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.public void hasArgs(java.lang.String name, java.lang.Object type, char separator)
name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.separator
- Sets the separator value allowed in between the
argument values being passed in.public void hasArgs(java.lang.String name, java.lang.Object type, char separator, boolean isOptional)
name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.separator
- Sets the separator value allowed in between the
argument values being passed in.isOptional
- Set to 'true' if an argument is optional,
'false' otherwise.public void hasArgs(int numArgs, java.lang.String name, java.lang.Object type, char separator, boolean isOptional)
numArgs
- Max number of arguments allowed.name
- Sets the display name of the argument value.type
- Sets the data type allowed for this argument.separator
- Sets the separator value allowed in between the
argument values being passed in.isOptional
- Set to 'true' if an argument is optional, 'false'
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |