|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openfaces.component.util.IterationStatus
public class IterationStatus
IterationStatus is simple storage object class for OpenFaces's ForEach component class.
After it is been created all it's values may be read only. It's constructor called by org.openfaces.component.foreach.ForEach class into setVarStatus() method.
ForEach| Constructor Summary | |
|---|---|
IterationStatus(java.lang.Object current,
int index,
int count,
boolean first,
boolean last,
java.lang.Integer begin,
java.lang.Integer end,
java.lang.Integer step)
see constructor call sequence into setVarStatus() method of org.openfaces.component.foreach.ForEach class. |
|
| Method Summary | |
|---|---|
java.lang.Integer |
getBegin()
Returns the value of the 'begin' tag attribute's value, 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 value-bound collection of data. |
java.lang.Integer |
getEnd()
Returns the value of the 'end' tag attribute's value, 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' tag attribute's value, 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IterationStatus(java.lang.Object current,
int index,
int count,
boolean first,
boolean last,
java.lang.Integer begin,
java.lang.Integer end,
java.lang.Integer step)
current - is current iterated object in the value-bound collection of data. If no value-bound collection is exist current must be a null.index - is index of current iteration. If value-bound data collection is specified it also the index of currend data object into collection.count - is count of current iteration.first - is equal true if current index is first into iteration sequence and it is equal false otherwise.last - is equal true if current index is last into iteration sequence and it is equal false otherwise.begin - is begin tag attribute's value of <o:forEach> tag.end - is end tag attribute's value of <o:forEach> tag.step - is step attribute's value of <o:forEach> tag.ForEach.setIterationStatus()| Method Detail |
|---|
public java.lang.Object getCurrent()
java.lang.Object or null if no value-bound data collection is specified.public int getIndex()
Retrieves the index of the current round of the iteration. If firstIndex tag attribute is specified index start from it's value. If value-bound data collection is specified it also the index of currend data object into collection.
As an example, an iteration with firstIndex = 10, lastIndex = 5, and step = -1 produces the indexes 10, 9, 8, 7, 6 and 5 in that order (of course if value-bound collection allow this indexes, or if it is not specified completely).
public 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.
public boolean isFirst()
getIndex() != 0, for 'index' refers to the absolute index of the current 'item' in the context of its underlying collection. It is always that case that a true result from isFirst() implies getCount() == 1.
true if the current round is the first in the iteration, false otherwise.public boolean isLast()
isFirst(), subsetting is taken into account. isLast() is refer to whether or not the current round will be the final round of iteration.
true if the current round is the last in the iteration, false otherwise.public java.lang.Integer getBegin()
'begin' tag attribute's value, or null if no 'begin' attribute was specified.
'begin' value for the associated <o:forEach> tag, or null if no 'begin' attribute was specified.public java.lang.Integer getEnd()
'end' tag attribute's value, or null if no 'end' attribute was specified.
'end' value for the associated <o:forEach> tag, or null if no 'end' attribute was specified.public java.lang.Integer getStep()
'step' tag attribute's value, or null if no 'step' attribute was specified.
'step' value for the associated <o:forEach> tag, or null if no 'step' attribute was specified.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||