org.apache.tapestry.bean
Class EvenOdd

java.lang.Object
  extended by org.apache.tapestry.bean.EvenOdd

public class EvenOdd
extends Object

Used to emit a stream of alterating string values: "even", "odd", etc. This is often used in the Inspector pages to make the class of a <tr> alternate for presentation reasons.

Version:
$Id: EvenOdd.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
EvenOdd()
           
 
Method Summary
 String getNext()
          Returns "even" or "odd".
 boolean isEven()
           
 void setEven(boolean value)
          Overrides the even flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvenOdd

public EvenOdd()
Method Detail

getNext

public String getNext()
Returns "even" or "odd". Whatever it returns on one invocation, it will return the opposite on the next. By default, the first value returned is "even".


isEven

public boolean isEven()

setEven

public void setEven(boolean value)
Overrides the even flag.