Package freemarker.template
Interface TemplateCollectionModelEx
- All Superinterfaces:
TemplateCollectionModel,TemplateModel
- All Known Implementing Classes:
DefaultNonListCollectionAdapter
"collection" template language data type: Adds size/emptiness querybility to
TemplateCollectionModel. The added extra operations are provided by all Java Collection-s, and this
interface was added to make that accessible for templates too.- Since:
- 2.3.22
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Returns if the collection contains any elements.intsize()Returns the number items in this collection, orInteger.MAX_VALUE, if there are more thanInteger.MAX_VALUEitems.Methods inherited from interface freemarker.template.TemplateCollectionModel
iterator
-
Method Details
-
size
Returns the number items in this collection, orInteger.MAX_VALUE, if there are more thanInteger.MAX_VALUEitems.- Throws:
TemplateModelException
-
isEmpty
Returns if the collection contains any elements. This differs fromsize() != 0only in that the exact number of items need not be calculated.- Throws:
TemplateModelException
-