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
public class VelocityFormatter.VelocityAutoAlternator extends VelocityFormatter.VelocityAlternator
As VelocityAlternator, but callsalternate()automatically on rendering in a template.
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.app.tools.VelocityFormatter.VelocityAlternator
alternates, current
-
-
Constructor Summary
Constructors Constructor Description VelocityAutoAlternator(java.lang.String[] alternates)Constructor takes an array of Strings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()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
-
-
-
-
Method Detail
-
toString
public final java.lang.String toString()
Returns the current alternate, and automatically alternates to the next alternate in its sequence (trigged upon rendering).- Overrides:
toStringin classVelocityFormatter.VelocityAlternator- Returns:
- The current alternate in the sequence.
-
-