public interface TemplateCollectionModel extends TemplateModel
TemplateSequenceModel, and implementations of that interface needn't also implement this interface just because they can. They should though, if enumeration with this interface is significantly faster than enumeration by index. The
#listdirective will enumerate using this interface if it's available.
The enumeration should be repeatable if that's possible with reasonable effort, otherwise a second enumeration
attempt is allowed to throw an
TemplateModelException. Generally, the interface user Java code need not
handle that kind of exception, as in practice only the template author can handle it, by not listing such collections