| java.lang.Object com.ibm.icu.impl.data.TokenIterator
TokenIterator | public class TokenIterator (Code) | | An iterator class that returns successive string tokens from some
source. String tokens are, in general, separated by rule white
space in the source test. Furthermore, they may be delimited by
either single or double quotes (opening and closing quotes must
match). Escapes are processed using standard ICU unescaping.
|
Constructor Summary | |
public | TokenIterator(ResourceReader r) Construct an iterator over the tokens returned by the given
ResourceReader, ignoring blank lines and comment lines (first
non-blank character is '#'). |
Method Summary | |
public String | describePosition() Return a string description of the position of the last line
returned by readLine() or readLineSkippingComments(). | public int | getLineNumber() Return the one-based line number of the line of the last token returned by
next(). | public String | next() Return the next token from this iterator, or null if the last
token has been returned. |
TokenIterator | public TokenIterator(ResourceReader r)(Code) | | Construct an iterator over the tokens returned by the given
ResourceReader, ignoring blank lines and comment lines (first
non-blank character is '#'). Note that trailing comments on a
line, beginning with the first unquoted '#', are recognized.
|
describePosition | public String describePosition()(Code) | | Return a string description of the position of the last line
returned by readLine() or readLineSkippingComments().
|
getLineNumber | public int getLineNumber()(Code) | | Return the one-based line number of the line of the last token returned by
next(). Should only be called
after a call to next(); otherwise the return
value is undefined.
|
next | public String next() throws IOException(Code) | | Return the next token from this iterator, or null if the last
token has been returned.
|
|
|