|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.template.SimpleHash | +--freemarker.ext.misc.ExtendedHash
Simple extension to the SimpleHash
implementation.
This class implements a number of convenience facilities in the form of template
hash keys. The hash keys are:
_size
- retrieves the number of elements in the hash_keys
- returns an ExtendedList
model containing all
keys in the hash_values
- returns an ExtendedList
model containing all
values in the hash
ExtendedList
, Serialized FormFields inherited from class freemarker.template.SimpleHash |
hash |
Constructor Summary | |
ExtendedHash()
Creates new ExtendedHash . |
|
ExtendedHash(java.util.Map hash)
Creates new ExtendedHash given a backing Map . |
Method Summary | |
TemplateModel |
get(java.lang.String key)
Gets a TemplateModel from the hash. |
Methods inherited from class freemarker.template.SimpleHash |
equals, getAsObject, hashCode, isEmpty, put, put, put, put, put, remove, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExtendedHash()
ExtendedHash
.public ExtendedHash(java.util.Map hash)
ExtendedHash
given a backing Map
.Method Detail |
public TemplateModel get(java.lang.String key) throws TemplateModelException
TemplateModel
from the hash. If the
key matches one of the special values used in this implementation,
return the special value, otherwise return the value from the underlying
Map
.get
in class SimpleHash
key
- the name by which the TemplateModel
is identified in the template.TemplateModel
referred to by the key,
or null
if not found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |