public class FileListTemporalDocumentIterator extends Object implements Iterator<TemporalDocument>
TemporalDocument
instances
given a file that contains list of files and their creation time stamps, each
on a separate line. Any files without time stamps have their last modified
time used as their creation time.
This class is thread-safe.
Constructor and Description |
---|
FileListTemporalDocumentIterator(String fileListName)
Creates an
Iterator over the files listed in the provided file. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if there are more documents to return. |
TemporalDocument |
next()
Returns the next document from the list.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public FileListTemporalDocumentIterator(String fileListName) throws IOException
Iterator
over the files listed in the provided file.IOException
- if any error occurs when reading fileListName
public boolean hasNext()
true
if there are more documents to return.hasNext
in interface Iterator<TemporalDocument>
public TemporalDocument next()
next
in interface Iterator<TemporalDocument>
public void remove()
UnsupportedOperationException
if called.remove
in interface Iterator<TemporalDocument>
Copyright © 2012. All Rights Reserved.