public interface ForEachStatus
ForEach
.
The main use is to get the object in the outer iteration:
forEachStatus.previous.each
Since 8.0.0, we enhance this class to be consistent with JSTL's varStatus properties.
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getBegin()
Returns the index (starting from 0) that the iteration begins at,
or null if not specified (and 0 is assumed).
|
int |
getCount()
Retrieves the "count" of the current round of the iteration.
|
java.lang.Object |
getCurrent()
Returns the object of this iteration.
|
java.lang.Object |
getEach()
Deprecated.
As of release 8.0.0, use
getCurrent() instead. |
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.
|
java.lang.Integer |
getStep()
Returns the value of the 'step' attribute for the associated tag,
or null if no 'step' attribute was specified.
|
boolean |
isFirst()
Returns whether the current round is the first pass through the iteration
|
boolean |
isLast()
Returns whether the current round is the last pass through the iteration
|
ForEachStatus getPrevious()
java.lang.Object getEach()
getCurrent()
instead.java.lang.Object getCurrent()
int getIndex()
For example, if the iteration starts at the fifth element (forEachBegin is 4), then the first value returned by this method will be 4.
java.lang.Integer getBegin()
java.lang.Integer getEnd()
boolean isFirst()
boolean isLast()
java.lang.Integer getStep()
int getCount()
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.