com.primix.tapestry.inspector
Class EvenOdd

java.lang.Object
  |
  +--com.primix.tapestry.inspector.EvenOdd
All Implemented Interfaces:
IPoolable

public class EvenOdd
extends java.lang.Object
implements IPoolable

Used to emit a stream of alteranting 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,v 1.8 2001/08/26 15:30:14 hship Exp $
Author:
Howard Ship

Constructor Summary
EvenOdd()
           
 
Method Summary
 java.lang.String getNext()
          Returns "even" or "odd".
 boolean isEven()
           
 void resetForPool()
          Resets the internal flag such that the next value from getNext() will be "even".
 void setEven(boolean value)
           
 
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 java.lang.String getNext()
Returns "even" or "odd". Whatever it returns on one invocation, it will return the opposite on the next.

isEven

public boolean isEven()

setEven

public void setEven(boolean value)

resetForPool

public void resetForPool()
Resets the internal flag such that the next value from getNext() will be "even".
Specified by:
resetForPool in interface IPoolable