C# Класс 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.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
alternates String[]
current int

Открытые методы

Метод Описание
Alternate ( ) : String

Alternates to the next in the list.

ToString ( ) : String

Returns the current alternate.

VelocityAlternator ( ) : System

Constructor takes an array of Strings.

Описание методов

Alternate() публичный Метод

Alternates to the next in the list.
public Alternate ( ) : String
Результат String

ToString() публичный Метод

Returns the current alternate.
public ToString ( ) : String
Результат String

VelocityAlternator() публичный Метод

Constructor takes an array of Strings.
public VelocityAlternator ( ) : System
Результат System

Описание свойств

alternates защищенное свойство

protected String[] alternates
Результат String[]

current защищенное свойство

protected int current
Результат int