Package ghidra.program.database.map
Class AddressIndexPrimaryKeyIterator
- java.lang.Object
-
- ghidra.program.database.map.AddressIndexPrimaryKeyIterator
-
- All Implemented Interfaces:
DBLongIterator
public class AddressIndexPrimaryKeyIterator extends java.lang.Object implements DBLongIterator
Long iterator over indexed addresses. The longs are primary keys returned ordered and restrained by the address field they contain
-
-
Constructor Summary
Constructors Constructor Description AddressIndexPrimaryKeyIterator()
Empty iterator constructorAddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean atStart)
Constructs a new AddressIndexPrimaryKeyIterator.AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address start, boolean before)
Constructs a new AddressIndexPrimaryKeyIterator starting at a given address.AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address minAddr, Address maxAddr, boolean atStart)
Constructs a new AddressIndexPrimaryKeyIterator for a range of addresses.AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, AddressSetView set, boolean atStart)
Constructs a new AddressIndexPrimaryKeyIterator for a set of addresses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete()
Delete the last record(s) associated with the last value read via the next or previous methods.boolean
hasNext()
Return true if a value is available in the forward direction.boolean
hasPrevious()
Return true if a value is available in the reverse directionlong
next()
Return the next long value.long
previous()
Return the previous long value.
-
-
-
Constructor Detail
-
AddressIndexPrimaryKeyIterator
public AddressIndexPrimaryKeyIterator()
Empty iterator constructor
-
AddressIndexPrimaryKeyIterator
public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean atStart) throws java.io.IOException
Constructs a new AddressIndexPrimaryKeyIterator. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the database table containing indexed addresses.indexCol
- the column that contains indexed addresses.addrMap
- the address mapatStart
- if true, iterates forward, otherwise iterates backwards.- Throws:
java.io.IOException
- if a database io error occurs.
-
AddressIndexPrimaryKeyIterator
public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address minAddr, Address maxAddr, boolean atStart) throws java.io.IOException
Constructs a new AddressIndexPrimaryKeyIterator for a range of addresses. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the database table containing indexed addresses.indexCol
- the column that contains indexed addresses.addrMap
- the address mapminAddr
- the first address in the range to iterate over.maxAddr
- the last address in the range to iterator over.atStart
- if true, iterates forward, otherwise iterates backwards.- Throws:
java.io.IOException
- if a database io error occurs.
-
AddressIndexPrimaryKeyIterator
public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, AddressSetView set, boolean atStart) throws java.io.IOException
Constructs a new AddressIndexPrimaryKeyIterator for a set of addresses. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the database table containing indexed addresses.indexCol
- the column that contains indexed addresses.addrMap
- the address mapset
- the set of addresses to iterator over.atStart
- if true, iterates forward, otherwise iterates backwards.- Throws:
java.io.IOException
- if a database io error occurs.
-
AddressIndexPrimaryKeyIterator
public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address start, boolean before) throws java.io.IOException
Constructs a new AddressIndexPrimaryKeyIterator starting at a given address. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the database table containing indexed addresses.indexCol
- the column that contains indexed addresses.addrMap
- the address mapstart
- the starting address for the iterator.before
- if true, positions the iterator before start, otherwise positions it after start.- Throws:
java.io.IOException
- if a database io error occurs.
-
-
Method Detail
-
hasNext
public boolean hasNext() throws java.io.IOException
Description copied from interface:DBLongIterator
Return true if a value is available in the forward direction.- Specified by:
hasNext
in interfaceDBLongIterator
- Throws:
java.io.IOException
- thrown if an IO error occurs- See Also:
DBLongIterator.hasNext()
-
hasPrevious
public boolean hasPrevious() throws java.io.IOException
Description copied from interface:DBLongIterator
Return true if a value is available in the reverse direction- Specified by:
hasPrevious
in interfaceDBLongIterator
- Throws:
java.io.IOException
- thrown if an IO error occurs- See Also:
DBLongIterator.hasPrevious()
-
next
public long next() throws java.io.IOException
Description copied from interface:DBLongIterator
Return the next long value.- Specified by:
next
in interfaceDBLongIterator
- Throws:
java.io.IOException
- thrown if an IO error occurs- See Also:
DBLongIterator.next()
-
previous
public long previous() throws java.io.IOException
Description copied from interface:DBLongIterator
Return the previous long value.- Specified by:
previous
in interfaceDBLongIterator
- Throws:
java.io.IOException
- thrown if an IO error occurs- See Also:
DBLongIterator.previous()
-
delete
public boolean delete() throws java.io.IOException
Description copied from interface:DBLongIterator
Delete the last record(s) associated with the last value read via the next or previous methods.- Specified by:
delete
in interfaceDBLongIterator
- Returns:
- true if record(s) was successfully deleted.
- Throws:
java.io.IOException
- thrown if an IO error occurs.- See Also:
DBLongIterator.delete()
-
-