RichFaces UI Components UI 4.3.0.CR1

org.richfaces.renderkit
Class ForEachLoop<T>

java.lang.Object
  extended by 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 ForEachLoop.StateAwareIterator.

Provides the status of iteration compatible with LoopTagStatus.

Author:
Lukas Fryc

Nested Class Summary
 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
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
 

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)

RichFaces UI Components UI 4.3.0.CR1

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