Package ghidra.program.model.listing

# Interface InstructionIterator

All Superinterfaces:
  `Iterable<Instruction>`, `Iterator<Instruction>`

All Known Implementing Classes:
  `InstructionRecordIterator`, `WrappingInstructionIterator`

public interface InstructionIterator extends Iterator<Instruction>, Iterable<Instruction>
Interface to define an iterator over some set of instructions.

See Also:
  - `CollectionUtils.asIterable(T)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasNext()`
  Returns true if the iteration has more elements.
  `Instruction`
  `next()`
  Return the next instruction in the iteration.

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

  `forEach, iterator, spliterator`

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

  `forEachRemaining, remove`

- ## Method Details

  - ### hasNext

    boolean hasNext()
    Returns true if the iteration has more elements.
    Specified by:
      `hasNext` in interface `Iterator<Instruction>`

  - ### next

    Instruction next()
    Return the next instruction in the iteration.
    Specified by:
      `next` in interface `Iterator<Instruction>`