| Constructor and Description |
|---|
FilteredIterator(BufferedReader reader,
TokenFilter filter)
Creates a filtered iterator using the reader as a source of tokens
|
FilteredIterator(Iterator<String> tokens,
TokenFilter filter)
Creates a filtered iterator using provided iterator as the source of
tokens
|
FilteredIterator(String str,
TokenFilter filter)
Creates a filtered iterator using the string as a source of tokens
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if this iterator has additional tokens that would be
accepted by the filter |
String |
next()
Returns the next word from the reader that has passed the filter.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public FilteredIterator(String str, TokenFilter filter)
public FilteredIterator(BufferedReader reader, TokenFilter filter)
public FilteredIterator(Iterator<String> tokens, TokenFilter filter)
public boolean hasNext()
true if this iterator has additional tokens that would be
accepted by the filterpublic String next()
public void remove()
UnsupportedOperationException if called.Copyright © 2012. All Rights Reserved.