Package freemarker.template
Interface TemplateCollectionModel
- All Superinterfaces:
TemplateModel
- All Known Implementing Classes:
SimpleCollection
This interface can be implemented by a class to make a variable "foreach-able",
i.e. the model can be used as the list in a <foreach...>
or a <list...> directive. Use this model when
your collection does not support index-based access and possibly,
the size cannot be known in advance. If you need index-based
access, use a
TemplateSequenceModel instead.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface freemarker.template.TemplateModel
TemplateModel.InvalidExpressionModel, TemplateModel.JavaNull -
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
INVALID_EXPRESSION, JAVA_NULL, NOTHING -
Method Summary
Modifier and TypeMethodDescriptioniterator()Retrieves a template model iterator that is used to iterate over the elements in this collection.
-
Method Details
-
iterator
Retrieves a template model iterator that is used to iterate over the elements in this collection.- Throws:
TemplateModelException
-