org.richfaces.renderkit

## Class ForEachLoop.StateAwareIterator

- java.lang.Object
- - org.richfaces.renderkit.ForEachLoop.StateAwareIterator

- All Implemented Interfaces:
    Iterator<T>
  Enclosing class:
    ForEachLoop<T>

      public class ForEachLoop.StateAwareIterator
      extends Object
      implements Iterator<T>

  Wraps `Iterator` instance in order to allow setup properties begin, end and step of iteration.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateAwareIterator(Iterator<T> iterator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Asks underlying iterator if there is next element available.
    `T` | `next()` Provides next element of iteration given by begin, end and step properties
    `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`

- - ### Constructor Detail

    - #### StateAwareIterator

          public StateAwareIterator(Iterator<T> iterator)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Asks underlying iterator if there is next element available. This method can call method `Iterator.next()` for underlying iterator in order to determine if there is next element (especially when there are begin or step properties setup).
      Specified by:
        `hasNext` in interface `Iterator<T>`

    - #### next

          public T next()

      Provides next element of iteration given by begin, end and step properties
      Specified by:
        `next` in interface `Iterator<T>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<T>`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.