Package ghidra.program.database.util

# Class IndexedAddressIterator

java.lang.Object
ghidra.program.database.util.IndexedAddressIterator

All Implemented Interfaces:
  `AddressIterator`, `Iterable<Address>`, `Iterator<Address>`

public class IndexedAddressIterator extends Object implements AddressIterator
Iterates over a FieldIterator; the field is the address but not the key; the column for the field must be indexed.

- ## Field Summary

  ### Fields inherited from interface ghidra.program.model.address.AddressIterator

  `EMPTY_ITERATOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IndexedAddressIterator(DBFieldIterator iter, AddressMap addrMap, int colIndex, ErrorHandler errHandler)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasNext()`
  Checks if there is a next address in the iteration.
  `Iterator<Address>`
  `iterator()`
  `Address`
  `next()`
  Get the next address.
  `void`
  `remove()`

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

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

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining`

- ## Constructor Details

  - ### IndexedAddressIterator

    public IndexedAddressIterator(DBFieldIterator iter, AddressMap addrMap, int colIndex, ErrorHandler errHandler)
    Constructor
    Parameters:
      `iter` - field iterator that is the address
      `addrMap` - address map to convert the longs to addresses
      `colIndex` - indexed column in the record

- ## Method Details

  - ### remove

    public void remove()
    Specified by:
      `remove` in interface `Iterator<Address>`
    See Also:
      - `Iterator.remove()`

  - ### hasNext

    public boolean hasNext()
    Description copied from interface: `AddressIterator`
    Checks if there is a next address in the iteration.
    Specified by:
      `hasNext` in interface `AddressIterator`
    Specified by:
      `hasNext` in interface `Iterator<Address>`
    Returns:
      true if there is a next address.
    See Also:
      - `AddressIterator.hasNext()`

  - ### next

    public Address next()
    Description copied from interface: `AddressIterator`
    Get the next address.

    NOTE: This deviates from the standard `Iterator` interface by returning null instead of throwing an exception.

    Specified by:
      `next` in interface `AddressIterator`
    Specified by:
      `next` in interface `Iterator<Address>`
    Returns:
      the next address in the iteration.
    See Also:
      - `AddressIterator.next()`

  - ### iterator

    public Iterator<Address> iterator()
    Specified by:
      `iterator` in interface `AddressIterator`
    Specified by:
      `iterator` in interface `Iterable<Address>`