| Constructor and Description |
|---|
BufferedIterator(BufferedReader br)
Tokenizes the string contents on the reader and buffers to the tokens to
allow arbitrary look-ahead.
|
BufferedIterator(Iterator<String> tokens)
Buffers the tokens in the provided iterator to allow arbitrarily
look-ahead.
|
BufferedIterator(String str)
Tokenizes the string and buffers to the tokens to allow arbitrary
look-ahead.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if the stream contains another token to return. |
String |
next()
Returns the next token in the stream.
|
List<String> |
peek(int tokens)
Returns an list of the next tokens in the stream based on the requested
amount.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public BufferedIterator(String str)
public BufferedIterator(BufferedReader br)
public boolean hasNext()
true if the stream contains another token to return.public String next()
public List<String> peek(int tokens)
NoSuchElementException.tokens - the number of tokens to access in the streampublic void remove()
UnsupportedOperationException if called.Copyright © 2012. All Rights Reserved.