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

All Implemented Interfaces:

All Known Implementing Classes:
    CollectionAndSequence, EnumerationModel, RegexMatchModel, JythonSequenceModel, NodeListModel, CollectionModel, SimpleCollection, ArrayModel, IteratorModel

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.
Method from freemarker.template.TemplateCollectionModel Summary:
Method from freemarker.template.TemplateCollectionModel Detail:
 public TemplateModelIterator iterator() throws TemplateModelException
    Retrieves a template model iterator that is used to iterate over the elements in this collection.