org.richfaces.renderkit

## Class ForEachLoop<T>

- java.lang.Object
- - org.richfaces.renderkit.ForEachLoop<T>

- All Implemented Interfaces:
    Iterable<T>

      public class ForEachLoop<T>
      extends Object
      implements Iterable<T>

  Provides implementation of `Iterable` object wrapping `Collection`, `Iterable`, array or `Iterator`.

  Provides the status of iteration compatible with `LoopTagStatus`.

  Author:
    Lukas Fryc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ForEachLoop.StateAwareIterator` Wraps `Iterator` instance in order to allow setup properties begin, end and step of iteration.
    `class` | `ForEachLoop.Status` Provides the functionality of `LoopTagStatus` for state of iteration.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> ForEachLoop<T>` | `getInstance(Iterable<T> iterable)`
    `static <T> ForEachLoop<T>` | `getInstance(Iterator<T> iterator)`
    `static <T> ForEachLoop<T>` | `getInstance(T[] array)`
    `ForEachLoop.Status` | `getStatus()`
    `Iterator<T>` | `iterator()`
    `void` | `setBegin(int begin)`
    `void` | `setEnd(int end)`
    `void` | `setStep(int step)`

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

- - ### Method Detail

    - #### getInstance

          public static <T> ForEachLoop<T> getInstance(Iterator<T> iterator)

    - #### getInstance

          public static <T> ForEachLoop<T> getInstance(Iterable<T> iterable)

    - #### getInstance

          public static <T> ForEachLoop<T> getInstance(T[] array)

    - #### iterator

          public Iterator<T> iterator()

      Specified by:
        `iterator` in interface `Iterable<T>`

    - #### getStatus

          public ForEachLoop.Status getStatus()

    - #### setBegin

          public void setBegin(int begin)

    - #### setEnd

          public void setEnd(int end)

    - #### setStep

          public void setStep(int step)

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