Package freemarker.template
Interface TemplateHashModel
-
- All Superinterfaces:
TemplateModel
- All Known Subinterfaces:
TemplateHashModelEx,TemplateHashModelEx2
- All Known Implementing Classes:
AllHttpScopesHashModel,ArrayModel,BeanModel,BooleanModel,CollectionModel,DateModel,DefaultMapAdapter,DOMNodeModel,EnumerationModel,Environment.Namespace,HttpRequestHashModel,HttpRequestParametersHashModel,HttpSessionHashModel,IteratorModel,MapModel,NodeListModel,NodeListModel,NodeModel,NumberModel,ResourceBundleModel,ServletContextHashModel,SimpleHash,SimpleMapModel,StringModel,TaglibFactory
public interface TemplateHashModel extends TemplateModel
"hash" template language data type: an object that contains other objects accessible through string keys (sub-variable names). It, in itself, doesn't support listing the keys or values (TemplateHashModelExdoes).In templates they are used like
myHash.myKeyormyHash[myDynamicKey].
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TemplateModelget(java.lang.String key)Gets a TemplateModel from the hash.booleanisEmpty()
-
-
-
Method Detail
-
get
TemplateModel get(java.lang.String key) throws TemplateModelException
Gets a TemplateModel from the hash.- Parameters:
key- the name by which the TemplateModel is identified in the template.- Returns:
- the TemplateModel referred to by the key, or null if not found.
- Throws:
TemplateModelException
-
isEmpty
boolean isEmpty() throws TemplateModelException- Throws:
TemplateModelException
-
-