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 TypeMethodDescriptionboolean
isEmpty()
Returns if the collection contains any elements.int
size()
Returns the number items in this collection, orInteger.MAX_VALUE
, if there are more thanInteger.MAX_VALUE
items.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_VALUE
items.- Throws:
TemplateModelException
-
isEmpty
Returns if the collection contains any elements. This differs fromsize() != 0
only in that the exact number of items need not be calculated.- Throws:
TemplateModelException
-