FileDocCategorySizeDatePackage
IteratorStatus.javaAPI DocExample2111Mon Jul 23 13:26:50 BST 2007org.apache.struts2.views.jsp

IteratorStatus

public class IteratorStatus extends Object
The iterator tag can export an IteratorStatus object so that one can get information about the status of the iteration, such as the size, current index, and whether any more items are available.

Fields Summary
protected StatusState
state
Constructors Summary
public IteratorStatus(StatusState aState)

        state = aState;
    
Methods Summary
public intgetCount()

        return state.index + 1;
    
public intgetIndex()

        return state.index;
    
public booleanisEven()

        return ((state.index + 1) % 2) == 0;
    
public booleanisFirst()

        return state.index == 0;
    
public booleanisLast()

        return state.last;
    
public booleanisOdd()

        return ((state.index + 1) % 2) == 1;
    
public intmodulus(int operand)

        return (state.index + 1) % operand;