Interface RecordIterator
-
- All Known Implementing Classes:
FileRecordIterator,MemoryJournal.MemoryRecordIterator
public interface RecordIteratorRecordIterator interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this iterator.booleanhasNext()Return a flag indicating whether there are more records.RecordnextRecord()Return the next record.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Return a flag indicating whether there are more records.- Returns:
trueif there are more records;falseotherwise
-
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.
-
-