org.apache.velocity.app.tools

Class VelocityFormatter.VelocityAutoAlternator

public class VelocityFormatter.VelocityAutoAlternator extends VelocityFormatter.VelocityAlternator

As VelocityAlternator, but calls alternate() automatically on rendering in a template.
Constructor Summary
VelocityAutoAlternator(String[] alternates)
Constructor takes an array of Strings.
Method Summary
StringtoString()
Returns the current alternate, and automatically alternates to the next alternate in its sequence (trigged upon rendering).

Constructor Detail

VelocityAutoAlternator

public 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).

Returns: The current alternate in the sequence.

Copyright B) 2002 Apache Software Foundation. All Rights Reserved.