org.zkoss.zk.ui.util
Interface ForEachStatus

All Known Implementing Classes:
AbstractForEachStatus

public interface ForEachStatus

Represents the runtime information of each iteration caused by ForEach.

The main use is to get the object in the outer iteration: forEachStatus.previous.each

Author:
tomyeh

Method Summary
 java.lang.Integer getBegin()
          Returns the index (starting from 0) that the iteration begins at, or null if not specified (and 0 is assumed).
 java.lang.Object getEach()
          Returns the object of this iteration.
 java.lang.Integer getEnd()
          Returns the index (starting from 0) that the iteration ends at, or null if not specified (and the last element is assumed).
 int getIndex()
          Returns the index of the current round of the iteration.
 ForEachStatus getPrevious()
          Returns the status of the enclosing forEach statement.
 

Method Detail

getPrevious

ForEachStatus getPrevious()
Returns the status of the enclosing forEach statement.


getEach

java.lang.Object getEach()
Returns the object of this iteration.


getIndex

int getIndex()
Returns the index of the current round of the iteration. If iteration is being performed over a subset of an underlying array, collection, or other type, the index returned is absolute with respect to the underlying collection. Indices are 0-based.

For example, if the iteration starts at the fifth element (forEachBegin is 4), then the first value returned by this method will be 4.


getBegin

java.lang.Integer getBegin()
Returns the index (starting from 0) that the iteration begins at, or null if not specified (and 0 is assumed).


getEnd

java.lang.Integer getEnd()
Returns the index (starting from 0) that the iteration ends at, or null if not specified (and the last element is assumed).



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo