Interface RecordIterator
-
- All Known Implementing Classes:
FileRecordIterator
,MemoryJournal.MemoryRecordIterator
public interface RecordIterator
RecordIterator interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close this iterator.boolean
hasNext()
Return a flag indicating whether there are more records.Record
nextRecord()
Return the next record.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Return a flag indicating whether there are more records.- Returns:
true
if there are more records;false
otherwise
-
nextRecord
Record nextRecord() throws NoSuchElementException, JournalException
Return the next record. If there are no more records, throws aNoSuchElementException
. If an error occurs, throws aJournalException
.- Returns:
- next record
- Throws:
NoSuchElementException
- if there are no more recordsJournalException
- if another error occurs
-
close
void close()
Close this iterator. Releases all associated resources.
-
-