Package ghidra.program.database.code

# Class InstructionRecordIterator

java.lang.Object
ghidra.program.database.code.InstructionRecordIterator

All Implemented Interfaces:
  `InstructionIterator`, `Iterable<Instruction>`, `Iterator<Instruction>`

public class InstructionRecordIterator extends Object implements InstructionIterator
Converts a record iterator into an instruction iterator.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InstructionRecordIterator(CodeManager codeMgr, RecordIterator it, boolean forward)`
  Constructs a new InstructionRecordIterator

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasNext()`
  Returns true if the iteration has more elements.
  `Iterator<Instruction>`
  `iterator()`
  `Instruction`
  `next()`
  Return the next instruction in the iteration.
  `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

  - ### InstructionRecordIterator

    public InstructionRecordIterator(CodeManager codeMgr, RecordIterator it, boolean forward)
    Constructs a new InstructionRecordIterator
    Parameters:
      `codeMgr` - the code manager
      `it` - the record iterator.
      `forward` - the direction of the iterator.

- ## Method Details

  - ### hasNext

    public boolean hasNext()
    Description copied from interface: `InstructionIterator`
    Returns true if the iteration has more elements.
    Specified by:
      `hasNext` in interface `InstructionIterator`
    Specified by:
      `hasNext` in interface `Iterator<Instruction>`
    See Also:
      - `CodeUnitIterator.hasNext()`

  - ### next

    public Instruction next()
    Description copied from interface: `InstructionIterator`
    Return the next instruction in the iteration.
    Specified by:
      `next` in interface `InstructionIterator`
    Specified by:
      `next` in interface `Iterator<Instruction>`
    See Also:
      - `CodeUnitIterator.next()`

  - ### remove

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

  - ### iterator

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