Home » freemarker-2.3.13 » freemarker.template » [javadoc | source]
freemarker.template
public interface: TemplateSequenceModel [javadoc | source]

All Implemented Interfaces:
    TemplateModel

All Known Implementing Classes:
    NodeListModel, DocumentModel, AttributeNodeModel, ChunkedSequence, StringArraySequence, CollectionAndSequence, SimpleMethodModel, SynchronizedSequence, ConcatenatedSequence, CharacterDataNodeModel, RegexMatchModel, PINodeModel, EmptyStringAndSequence, NodeListModel, AncestorSequence, NodeModel, ReverseSequence, RhinoScriptableModel, DocumentTypeModel, SimpleList, JythonSequenceModel, NodeListModel, OverloadedMethodModel, ElementModel, TemplateModelListSequence, CollectionModel, NodeListTM, ArrayModel, NumericalRange, Iterator, SimpleSequence, GeneralPurposeNothing, RhinoFunctionModel

List values in a template data model whose elements are accessed by the index operator should implement this interface. In addition to accessing elements by index and querying size using the ?size built-in, objects that implement this interface can be iterated in <#foreach ...> and <#list ...> directives. The iteration is implemented by calling the #get(int) method repeatedly starting from zero and going to #size() - 1.
Method from freemarker.template.TemplateSequenceModel Summary:
get,   size
Method from freemarker.template.TemplateSequenceModel Detail:
 public TemplateModel get(int index) throws TemplateModelException
    Retrieves the i-th template model in this sequence.
 public int size() throws TemplateModelException