Package ghidra.program.database.map

# Class AddressIndexPrimaryKeyIterator

java.lang.Object
ghidra.program.database.map.AddressIndexPrimaryKeyIterator

All Implemented Interfaces:
  `DBFieldIterator`

public class AddressIndexPrimaryKeyIterator extends Object implements DBFieldIterator
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 constructor
  `AddressIndexPrimaryKeyIterator(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

  Modifier and Type
  Method
  Description
  `boolean`
  `delete()`
  Delete the last record(s) associated with the last Field value read via the next or previous methods.
  `boolean`
  `hasNext()`
  Return true if a Field is available in the forward direction.
  `boolean`
  `hasPrevious()`
  Return true if a Field is available in the reverse direction
  `Field`
  `next()`
  Return the next Field value or null if one is not available.
  `Field`
  `previous()`
  Return the previous Field value or null if one is not available.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AddressIndexPrimaryKeyIterator

    public AddressIndexPrimaryKeyIterator()
    Empty iterator constructor

  - ### AddressIndexPrimaryKeyIterator

    public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean atStart) throws 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 map
      `atStart` - if true, iterates forward, otherwise iterates backwards.
    Throws:
      `IOException` - if a database io error occurs.

  - ### AddressIndexPrimaryKeyIterator

    public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address minAddr, Address maxAddr, boolean atStart) throws 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 map
      `minAddr` - 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:
      `IOException` - if a database io error occurs.

  - ### AddressIndexPrimaryKeyIterator

    public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, AddressSetView set, boolean atStart) throws 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 map
      `set` - the set of addresses to iterator over.
      `atStart` - if true, iterates forward, otherwise iterates backwards.
    Throws:
      `IOException` - if a database io error occurs.

  - ### AddressIndexPrimaryKeyIterator

    public AddressIndexPrimaryKeyIterator(Table table, int indexCol, AddressMap addrMap, Address start, boolean before) throws 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 map
      `start` - the starting address for the iterator.
      `before` - if true, positions the iterator before start, otherwise positions it after start.
    Throws:
      `IOException` - if a database io error occurs.

- ## Method Details

  - ### hasNext

    public boolean hasNext() throws IOException
    Description copied from interface: `DBFieldIterator`
    Return true if a Field is available in the forward direction.
    Specified by:
      `hasNext` in interface `DBFieldIterator`
    Throws:
      `IOException` - thrown if an IO error occurs

  - ### hasPrevious

    public boolean hasPrevious() throws IOException
    Description copied from interface: `DBFieldIterator`
    Return true if a Field is available in the reverse direction
    Specified by:
      `hasPrevious` in interface `DBFieldIterator`
    Throws:
      `IOException` - thrown if an IO error occurs

  - ### next

    public Field next() throws IOException
    Description copied from interface: `DBFieldIterator`
    Return the next Field value or null if one is not available.
    Specified by:
      `next` in interface `DBFieldIterator`
    Throws:
      `IOException` - thrown if an IO error occurs

  - ### previous

    public Field previous() throws IOException
    Description copied from interface: `DBFieldIterator`
    Return the previous Field value or null if one is not available.
    Specified by:
      `previous` in interface `DBFieldIterator`
    Throws:
      `IOException` - thrown if an IO error occurs

  - ### delete

    public boolean delete() throws IOException
    Description copied from interface: `DBFieldIterator`
    Delete the last record(s) associated with the last Field value read via the next or previous methods.
    Specified by:
      `delete` in interface `DBFieldIterator`
    Returns:
      true if record(s) was successfully deleted.
    Throws:
      `IOException` - thrown if an IO error occurs.