Constructor and Description |
---|
OneLinePerDocumentIterator(String documentsFile)
Constructs an
Iterator for the documents contained in the
provided file. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if there are more documents in the provided file. |
Document |
next()
Returns the next document from the file.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public OneLinePerDocumentIterator(String documentsFile) throws IOException
Iterator
for the documents contained in the
provided file.documentsFile
- a file that contains one document per lineIOException
- if any error occurs when reading documentsFile
public boolean hasNext()
true
if there are more documents in the provided file.public Document next()
public void remove()
UnsupportedOperationException
if called.Copyright © 2012. All Rights Reserved.