|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.contrib.Getopt
Constructor Summary | |
Getopt(java.lang.String[] argv,
java.lang.String optstring)
Initialize a Getopt instance. |
Method Summary | |
boolean |
hasMoreOptions()
Test to see if more options are available. |
static void |
main(java.lang.String[] argv)
The sample main() program shown in this document is provided. |
char |
nextOption()
nextOption() cranks the option parser. |
java.lang.String |
optarg()
Reset after each call to nextOption(), optarg() returns the argument to the option, if one was provided, and if Getopt is "expecting" an argument as specified by the optstring (using the colon notation). |
boolean |
opterr()
Returns the current state of the opterr flag. |
void |
opterr(boolean b)
Set the value of the opterr flag. |
char |
optflag()
Reset after each call to nextOption(), optflag() returns the current option flag (letter). |
int |
optind()
Possibly reset after each call to nextOption(), optind() returns the index of the next argument to be processed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Getopt(java.lang.String[] argv, java.lang.String optstring)
String
- argv[] An array of strings representing command-line
arguments.String
- optstring A string containing valid option characters. If
an option character is followed by a colon (":")
an argument is expected following the option
on the command line.Method Detail |
public boolean hasMoreOptions()
public char nextOption()
public char optflag()
public java.lang.String optarg()
public int optind()
public boolean opterr()
public void opterr(boolean b)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |