Package freemarker.template
Interface TemplateCollectionModelEx
-
- All Superinterfaces:
TemplateCollectionModel
,TemplateModel
- All Known Implementing Classes:
DefaultNonListCollectionAdapter
public interface TemplateCollectionModelEx extends TemplateCollectionModel
"collection" template language data type: Adds size/emptiness querybility toTemplateCollectionModel
. The added extra operations are provided by all JavaCollection
-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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
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 Detail
-
size
int size() throws TemplateModelException
Returns the number items in this collection, orInteger.MAX_VALUE
, if there are more thanInteger.MAX_VALUE
items.- Throws:
TemplateModelException
-
isEmpty
boolean isEmpty() throws TemplateModelException
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
-
-