|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.util.Arguments
An iterator for command line arguments.
Constructor Summary | |
Arguments(String[] args)
Create a CommandLineIterator. |
Method Summary | |
boolean |
hasMore()
Test if there are more strings to come. |
boolean |
hasMore(int amount)
Test if there are more strings to come. |
boolean |
match(String s)
Return if the next argument matches the string. |
String |
next()
Return the next string or null if there are no more arguments left. |
String |
next(String error)
Return the next string or throw an BadArgException if there areno more arguments left. |
boolean |
startsWith(String s)
Return if the next argument starts with the given string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Arguments(String[] args) throws BadArgException
args
- the argumentsMethod Detail |
public String next()
public String next(String error) throws BadArgException
BadArgException
public boolean match(String s)
public boolean startsWith(String s)
public boolean hasMore()
public boolean hasMore(int amount)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |