|
getopt-0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object that stores a list of Option
objects and then
parse command line arguments using them.
Field Summary | |
static int |
OPTION_SETUP_DOS
Indicates the for overal setup of the options. |
static int |
OPTION_SETUP_GNU
Indicates the for overal setup of the options. |
static int |
OPTION_SETUP_POSIX
Indicates the for overal setup of the options. |
Method Summary | |
void |
add(Option option)
Adds an Option to the list of parseable options. |
Option |
get(String optionName)
Returns an Option from the list of parseable options. |
List |
getProgramArgs()
Returns the program arguments. |
Iterator |
iterator()
Returns an Iterator object which will iterate over all
of the Options contained by this object. |
void |
remove(Option option)
Removes an Option from the list of parseable options. |
Option |
remove(String optionName)
Removes an Option from the list of parseable options. |
void |
setArgs(String[] args)
Sets the arguments from the command line. |
Field Detail |
public static final int OPTION_SETUP_GNU
public static final int OPTION_SETUP_POSIX
public static final int OPTION_SETUP_DOS
Method Detail |
public void add(Option option)
Option
to the list of parseable options.option
- The Option
to add.public void remove(Option option)
Option
from the list of parseable options.option
- The Option
to remove.public Option remove(String optionName)
Option
from the list of parseable options.optionName
- The name of the Option
to remove.The
- Option
which was removed. If this object does
not contain an Option by that name, then
null
will be returned.public Option get(String optionName)
Option
from the list of parseable options.optionName
- The name of the Option
to return.The
- Option
. If this object does not contain an
Option by that name, then null
will be
returned.public Iterator iterator()
Iterator
object which will iterate over all
of the Options
contained by this object.Iterator
public void setArgs(String[] args) throws OptionException
The options are processed immediately.
args
- The arguments from the command line.public List getProgramArgs()
|
getopt-0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |