public interface TemplateHashModelEx extends TemplateHashModel
TemplateHashModel by allowing
iterating through its keys and values. Consider implementing the modern variation of this,
TemplateHashModelEx2, which allows the more efficient listing of key-value pairs.
In templates they are used like hashes, but these will also work (among others):
myExtHash?size, myExtHash?keys, myExtHash?values, <#list myMap as k, v>.
DefaultMapAdapter,
SimpleHashNOTHING| Modifier and Type | Method and Description |
|---|---|
TemplateCollectionModel |
keys() |
int |
size() |
TemplateCollectionModel |
values() |
get, isEmptyint size() throws TemplateModelException
TemplateModelExceptionTemplateCollectionModel keys() throws TemplateModelException
TemplateScalarModel
(as the keys of hashes are always strings).TemplateModelExceptionTemplateCollectionModel values() throws TemplateModelException
TemplateModel-s.TemplateModelException