Package com.sun.enterprise.admin.cli
Class ArgumentTokenizer
java.lang.Object
com.sun.enterprise.admin.cli.ArgumentTokenizer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Stringprotected StringBuilder -
Constructor Summary
ConstructorsConstructorDescriptionArgumentTokenizer(String str) Construct a tokenizer for the specified string. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if there are more tokens available from this tokenizer's string.Return the next token from this tokenizer.protected StringReturn the next token starting at the current position, assuming whitespace has already been skipped.protected voidSkip white space.
-
Field Details
-
currentPosition
protected int currentPosition -
maxPosition
protected int maxPosition -
str
-
token
-
-
Constructor Details
-
ArgumentTokenizer
Construct a tokenizer for the specified string.- Parameters:
str- a string to be parsed.
-
-
Method Details
-
skipWhiteSpace
protected void skipWhiteSpace()Skip white space. -
hasMoreTokens
public boolean hasMoreTokens()Test if there are more tokens available from this tokenizer's string.- Returns:
trueif there are more tokens available from this tokenizer's string;falseotherwise.
-
nextToken
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
Return the next token starting at the current position, assuming whitespace has already been skipped.
-