|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectds.ov2.util.Commandline
public class Commandline
Command line instance that adds an index and the notion of the next unprocessed command line element to the string array received in the main method.
| Field Summary | |
|---|---|
private String[] |
args
The command line as received in the main method. |
private int |
next_option
The index of the next element in the command line. |
| Constructor Summary | |
|---|---|
Commandline(String[] args)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
continue_parsing()
Return true if not all command-line elements have been processed yet. |
boolean |
match(String option)
Check if the next unprocessed command-line element is equal to option. |
String |
next_option()
Return the next unprocessed command-line element without incrementing the option index next_option. |
String |
retrieve_option()
Return the next command unprocessed line element and increment the option index next_option. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final String[] args
private int next_option
match and retrieve_option().
| Constructor Detail |
|---|
public Commandline(String[] args)
args - the command line as received in the main method| Method Detail |
|---|
public boolean continue_parsing()
next_option still points to some
unprocessed command-line elementpublic String next_option()
next_option.
public String retrieve_option()
next_option.
public boolean match(String option)
option. If it is, the method returns true and the
command-line element is considered to be processed and the
index of the next unprocessed command line element next_option is incremented. The actual state changes to
record that the option option has been recognized is
done in Option.matched.
option - option to check agains the next command line element
option equals the next command line element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||