C# Class NVelocity.App.Tools.VelocityFormatter.VelocityAlternator

Class that returns alternating values in a template. It stores a list of alternate Strings, whenever alternate() is called it switches to the next in the list. The current alternate is retrieved through toString() - i.e. just by referencing the object in a Velocity template. For an example of usage see the makeAlternator() method below.
Afficher le fichier Open project: nats/castle-1.0.3-mono

Protected Properties

Свойство Type Description
alternates String[]
current int

Méthodes publiques

Méthode Description
Alternate ( ) : String

Alternates to the next in the list.

ToString ( ) : String

Returns the current alternate.

VelocityAlternator ( ) : System

Constructor takes an array of Strings.

Method Details

Alternate() public méthode

Alternates to the next in the list.
public Alternate ( ) : String
Résultat String

ToString() public méthode

Returns the current alternate.
public ToString ( ) : String
Résultat String

VelocityAlternator() public méthode

Constructor takes an array of Strings.
public VelocityAlternator ( ) : System
Résultat System

Property Details

alternates protected_oe property

protected String[] alternates
Résultat String[]

current protected_oe property

protected int current
Résultat int