Constructor and Description |
---|
WordIterator(BufferedReader br)
Constructs an iterator for all the tokens contained in text of the
provided reader.
|
WordIterator(String str)
Constructs an iterator for all the tokens contained in the string
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if there is another word to return. |
String |
next()
Returns the next word from the reader.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public WordIterator(String str)
public WordIterator(BufferedReader br)
public boolean hasNext()
true
if there is another word to return.public String next()
public void remove()
UnsupportedOperationException
if called.Copyright © 2012. All Rights Reserved.