Package db
Class KeyToRecordIterator
- java.lang.Object
-
- db.KeyToRecordIterator
-
- All Implemented Interfaces:
RecordIterator
public class KeyToRecordIterator extends java.lang.Object implements RecordIterator
-
-
Constructor Summary
Constructors Constructor Description KeyToRecordIterator(Table table, DBLongIterator keyIter)Construct a record iterator from a secondary index key iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete()Delete the last Record read via the next or previous methods.booleanhasNext()Return true if a Record is available in the forward direction.booleanhasPrevious()Return true if a Record is available in the reverse directionRecordnext()Return the nexy Record or null if one is not available.Recordprevious()Return the previous Record or null if one is not available.
-
-
-
Constructor Detail
-
KeyToRecordIterator
public KeyToRecordIterator(Table table, DBLongIterator keyIter)
Construct a record iterator from a secondary index key iterator.- Parameters:
keyIter- key iterator.
-
-
Method Detail
-
hasNext
public boolean hasNext() throws java.io.IOExceptionDescription copied from interface:RecordIteratorReturn true if a Record is available in the forward direction.- Specified by:
hasNextin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.hasNext()
-
hasPrevious
public boolean hasPrevious() throws java.io.IOExceptionDescription copied from interface:RecordIteratorReturn true if a Record is available in the reverse direction- Specified by:
hasPreviousin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.hasPrevious()
-
next
public Record next() throws java.io.IOException
Description copied from interface:RecordIteratorReturn the nexy Record or null if one is not available.- Specified by:
nextin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.next()
-
previous
public Record previous() throws java.io.IOException
Description copied from interface:RecordIteratorReturn the previous Record or null if one is not available.- Specified by:
previousin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.previous()
-
delete
public boolean delete() throws java.io.IOExceptionDescription copied from interface:RecordIteratorDelete the last Record read via the next or previous methods.- Specified by:
deletein interfaceRecordIterator- Returns:
- true if record was successfully deleted.
- Throws:
java.io.IOException- thrown if an IO error occurs.- See Also:
RecordIterator.delete()
-
-