Package ghidra.program.model.address

# Class CachedAddressSetView.CachedRangeIterator

java.lang.Object
generic.util.AbstractPeekableIterator<AddressRange>
ghidra.program.model.address.CachedAddressSetView.CachedRangeIterator

All Implemented Interfaces:
  `PeekableIterator<AddressRange>`, `AddressRangeIterator`, `Iterable<AddressRange>`, `Iterator<AddressRange>`

Enclosing class:
  `CachedAddressSetView`

protected class CachedAddressSetView.CachedRangeIterator extends AbstractPeekableIterator<AddressRange> implements AddressRangeIterator

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Address`
  `cur`
  `protected final boolean`
  `forward`
  `protected final Address`
  `start`

  ### Fields inherited from class generic.util.AbstractPeekableIterator

  `next, soughtNext`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CachedRangeIterator(Address start, boolean forward)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Iterator<AddressRange>`
  `iterator()`
  `protected AddressRange`
  `seekNext()`
  Find the next element in this iterator, because the client called either `AbstractPeekableIterator.next` or `AbstractPeekableIterator.peek()`.

  ### Methods inherited from class generic.util.AbstractPeekableIterator

  `hasNext, next, peek`

  ### 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, hasNext, next, remove`

- ## Field Details

  - ### start

    protected final Address start

  - ### forward

    protected final boolean forward

  - ### cur

    protected Address cur

- ## Constructor Details

  - ### CachedRangeIterator

    public CachedRangeIterator(Address start, boolean forward)

- ## Method Details

  - ### iterator

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

  - ### seekNext

    protected AddressRange seekNext()
    Description copied from class: `AbstractPeekableIterator`
    Find the next element in this iterator, because the client called either `AbstractPeekableIterator.next` or `AbstractPeekableIterator.peek()`.
    Specified by:
      `seekNext` in class `AbstractPeekableIterator<AddressRange>`
    Returns:
      the next element