org.apache.velocity.app.tools
Class VelocityFormatter.VelocityAutoAlternator

java.lang.Object
  extended by org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
      extended by org.apache.velocity.app.tools.VelocityFormatter.VelocityAutoAlternator
Enclosing class:
VelocityFormatter

public class VelocityFormatter.VelocityAutoAlternator
extends VelocityFormatter.VelocityAlternator

As VelocityAlternator, but calls alternate() automatically on rendering in a template.


Field Summary
 
Fields inherited from class org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
alternates, current
 
Constructor Summary
VelocityFormatter.VelocityAutoAlternator(String[] alternates)
          Constructor takes an array of Strings.
 
Method Summary
 String toString()
          Returns the current alternate, and automatically alternates to the next alternate in its sequence (trigged upon rendering).
 
Methods inherited from class org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
alternate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VelocityFormatter.VelocityAutoAlternator

public VelocityFormatter.VelocityAutoAlternator(String[] alternates)
Constructor takes an array of Strings.

Parameters:
alternates - A String[].
Method Detail

toString

public final String toString()
Returns the current alternate, and automatically alternates to the next alternate in its sequence (trigged upon rendering).

Overrides:
toString in class VelocityFormatter.VelocityAlternator
Returns:
The current alternate in the sequence.


Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.