Package groovy.util

# Class ObservableList.ObservableIterator

java.lang.Object
groovy.util.ObservableList.ObservableIterator

All Implemented Interfaces:
  `Iterator`

Direct Known Subclasses:
  `ObservableList.ObservableListIterator`

Enclosing class:
  ObservableList

protected class ObservableList.ObservableIterator extends Object implements Iterator
Iterator wrapper that reports removals as observable list events.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected int`
  `cursor`
  Current list index for iterator-driven updates.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObservableIterator(Iterator iterDelegate)`
  Creates an observable iterator around the supplied delegate.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Iterator`
  `getDelegate()`
  Returns the wrapped iterator.
  `boolean`
  `hasNext()`
  `Object`
  `next()`
  `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.util.Iterator

  `forEachRemaining`

- ## Field Details

  - ### cursor

    protected int cursor
    Current list index for iterator-driven updates.

- ## Constructor Details

  - ### ObservableIterator

    public ObservableIterator(Iterator iterDelegate)
    Creates an observable iterator around the supplied delegate.
    Parameters:
      `iterDelegate` - the backing iterator

- ## Method Details

  - ### getDelegate

    public Iterator getDelegate()
    Returns the wrapped iterator.
    Returns:
      the backing iterator

  - ### hasNext

    public boolean hasNext()
    Specified by:
      `hasNext` in interface `Iterator`

  - ### next

    public Object next()
    Specified by:
      `next` in interface `Iterator`

  - ### remove

    public void remove()
    Specified by:
      `remove` in interface `Iterator`