Package org.apache.velocity.app.tools
Class VelocityFormatter.VelocityAutoAlternator
java.lang.Object
org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
org.apache.velocity.app.tools.VelocityFormatter.VelocityAutoAlternator
- Enclosing class:
- VelocityFormatter
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
ConstructorsConstructorDescriptionVelocityAutoAlternator
(String[] alternates) Constructor takes an array of Strings. -
Method Summary
Methods inherited from class org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
alternate
-
Constructor Details
-
VelocityAutoAlternator
Constructor takes an array of Strings.- Parameters:
alternates
- A String[].
-
-
Method Details
-
toString
Returns the current alternate, and automatically alternates to the next alternate in its sequence (trigged upon rendering).- Overrides:
toString
in classVelocityFormatter.VelocityAlternator
- Returns:
- The current alternate in the sequence.
-