Package ghidra.program.database.util
Class QueryRecordIterator
- java.lang.Object
 - 
- ghidra.program.database.util.QueryRecordIterator
 
 
- 
- All Implemented Interfaces:
 RecordIterator
public class QueryRecordIterator extends java.lang.Object implements RecordIterator
Iterator that only returns records from another iterator that match the given query. 
- 
- 
Constructor Summary
Constructors Constructor Description QueryRecordIterator(RecordIterator iter, Query query)Constructs a new QueryRecordIterator that filters the given record iterator with the given Query.QueryRecordIterator(RecordIterator iter, Query query, boolean forward)Constructor 
- 
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 directionDBRecordnext()Return the nexy Record or null if one is not available.DBRecordprevious()Return the previous Record or null if one is not available. 
 - 
 
- 
- 
Constructor Detail
- 
QueryRecordIterator
public QueryRecordIterator(RecordIterator iter, Query query)
Constructs a new QueryRecordIterator that filters the given record iterator with the given Query.- Parameters:
 iter- the record iterator to filter.query- the query used to filter.
 
- 
QueryRecordIterator
public QueryRecordIterator(RecordIterator iter, Query query, boolean forward)
Constructor- Parameters:
 iter- record iteratorquery- query needed to match the recordforward- true means iterate in the forward direction
 
 - 
 
- 
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()
 
- 
next
public DBRecord 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()
 
- 
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()
 
- 
previous
public DBRecord 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()
 
 - 
 
 -