com.sun.enterprise.admin.cli
Class ArgumentTokenizer
java.lang.Object
com.sun.enterprise.admin.cli.ArgumentTokenizer
public class ArgumentTokenizer
- extends Object
|
Method Summary |
boolean |
hasMoreTokens()
Test if there are more tokens available from this tokenizer's string. |
String |
nextToken()
Return the next token from this tokenizer. |
protected String |
scanToken()
Return the next token starting at the current position,
assuming whitespace has already been skipped. |
protected void |
skipWhiteSpace()
Skip white space. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentPosition
protected int currentPosition
maxPosition
protected int maxPosition
str
protected String str
token
protected StringBuilder token
ArgumentTokenizer
public ArgumentTokenizer(String str)
- Construct a tokenizer for the specified string.
- Parameters:
str - a string to be parsed.
skipWhiteSpace
protected void skipWhiteSpace()
- Skip white space.
hasMoreTokens
public boolean hasMoreTokens()
- Test if there are more tokens available from this tokenizer's string.
- Returns:
true if there are more tokens available from this
tokenizer's string; false otherwise.
nextToken
public String nextToken()
throws ArgumentTokenizer.ArgumentException
- Return the next token from this tokenizer.
- Returns:
- the next token from this tokenizer.
- Throws:
NoSuchElementException - if there are no more tokens in this
tokenizer's string.
ArgumentTokenizer.ArgumentException
scanToken
protected String scanToken()
throws ArgumentTokenizer.ArgumentException
- Return the next token starting at the current position,
assuming whitespace has already been skipped.
- Throws:
ArgumentTokenizer.ArgumentException
Copyright © 2012. All Rights Reserved.