public interface LoopTagStatus
Exposes the current status of an iteration. The Jakarta Standard Tag Library provides a mechanism for LoopTags to return information about the current index of the iteration and convenience methods to determine whether or not the current round is either the first or last in the iteration. It also lets authors use the status object to obtain information about the iteration range, step, and current object.
Environments that require more status can extend this interface.
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getBegin()
Returns the value of the 'begin' attribute for the associated tag, or null if no 'begin' attribute was specified.
|
int |
getCount()
Retrieves the "count" of the current round of the iteration.
|
java.lang.Object |
getCurrent()
Retrieves the current item in the iteration.
|
java.lang.Integer |
getEnd()
Returns the value of the 'end' attribute for the associated tag, or null if no 'end' attribute was specified.
|
int |
getIndex()
Retrieves the index of the current round of the iteration.
|
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 information about whether the current round of the iteration is the first one.
|
boolean |
isLast()
Returns information about whether the current round of the iteration is the last one.
|
java.lang.Object getCurrent()
int getIndex()
int getCount()
Retrieves the "count" of the current round of the iteration. The count is a relative, 1-based sequence number identifying the current "round" of iteration (in context with all rounds the current iteration will perform).
As an example, an iteration with begin = 5, end = 15, and step = 5 produces the counts 1, 2, and 3 in that order.
boolean isFirst()
true
if the current round is the first in the iteration, false
otherwise.boolean isLast()
true
if the current round is the last in the iteration, false
otherwise.java.lang.Integer getBegin()
java.lang.Integer getEnd()
java.lang.Integer getStep()