Package freemarker.template
Interface TemplateHashModel
-
- All Superinterfaces:
TemplateModel
- All Known Subinterfaces:
Scope,TemplateHashModelEx
- All Known Implementing Classes:
AbstractScope,BaseScope,BlockScope,Configuration,Environment,IncludedTemplateNamespace,LoopContext,MacroContext,MacroInvocationBodyContext,SimpleHash,TemplateNamespace
public interface TemplateHashModel extends TemplateModel
Hashes in a data model must implement this interface. Hashes are FreeMarker data objects that contain other objects through key-value mappings.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface freemarker.template.TemplateModel
TemplateModel.InvalidExpressionModel, TemplateModel.JavaNull
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
INVALID_EXPRESSION, JAVA_NULL, NOTHING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TemplateModelget(String key)Gets a TemplateModel from the hash.booleanisEmpty()
-
-
-
Method Detail
-
get
TemplateModel get(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
-
-