| freemarker.template.TemplateSequenceModel
All known Subclasses: freemarker.core.CollectionAndSequence, freemarker.ext.xml.NodeListModel, freemarker.template.GeneralPurposeNothing, freemarker.template.TemplateModelListSequence, freemarker.core.NumericalRange, freemarker.testcase.models.BooleanList2, freemarker.ext.beans.OverloadedMethodModel, freemarker.ext.dom.NodeModel, freemarker.ext.beans.CollectionModel, freemarker.ext.jython.JythonSequenceModel, freemarker.testcase.models.MultiModel4, freemarker.testcase.models.MultiModel1, freemarker.testcase.models.BooleanList1, freemarker.ext.beans.SimpleMethodModel, freemarker.testcase.models.MultiModel5, freemarker.ext.beans.ArrayModel, freemarker.ext.jdom.NodeListModel, freemarker.core.StringArraySequence, freemarker.template.SimpleSequence, freemarker.ext.rhino.RhinoScriptableModel,
TemplateSequenceModel | public interface TemplateSequenceModel extends TemplateModel(Code) | | 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
TemplateSequenceModel.get(int) method
repeatedly starting from zero and going to
TemplateSequenceModel.size() - 1.
author: Attila Szegedi, szegedia at users dot sourceforge dot net version: $Id: TemplateSequenceModel.java,v 1.10 2004/11/27 14:49:57 ddekany Exp $ |
Method Summary | |
TemplateModel | get(int index) Retrieves the i-th template model in this sequence.
the item at the specified index, or null ifthe index is out of bounds. | int | size() |
get | TemplateModel get(int index) throws TemplateModelException(Code) | | Retrieves the i-th template model in this sequence.
the item at the specified index, or null ifthe index is out of bounds. Note that a null value isinterpreted by FreeMarker as "variable does not exist", and accessinga missing variables is usually considered as an error in the FreeMarkerTemplate Language, so the usage of a bad index will not remain hidden. |
|
|