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