net.i2p.router.util

## Class CachedIteratorCollection.CachedIterator

- java.lang.Object
- - net.i2p.router.util.CachedIteratorCollection.CachedIterator

- All Implemented Interfaces:
    Iterator<E>
  Enclosing class:
    CachedIteratorCollection<E>

      public class CachedIteratorCollection.CachedIterator
      extends Object
      implements Iterator<E>

  Inner CachedIterator class - implements hasNext(), next() & remove()

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CachedIterator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Returns true as long as current Iteration Index Node (itrIndexNode) is non-null
    `E` | `next()` Returns the next node in the iteration
    `void` | `remove()` If nextCalled is true (i.e.

    - ### 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`

- - ### Constructor Detail

    - #### CachedIterator

          public CachedIterator()

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Returns true as long as current Iteration Index Node (itrIndexNode) is non-null
      Specified by:
        `hasNext` in interface `Iterator<E>`

    - #### next

          public E next()

      Returns the next node in the iteration
      Specified by:
        `next` in interface `Iterator<E>`

    - #### remove

          public void remove()

      If nextCalled is true (i.e. next() has been called at least once), remove() will remove the last returned Node
      Specified by:
        `remove` in interface `Iterator<E>`