|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans.RootMapModel
freemarker.ext.beans2 package
public class RootMapModel
A wrapper for an arbitrary map that will expose it as a TemplateModelRoot.
All values returned from the get(java.lang.String) method are automatically
passed through BeansWrapper.wrap(java.lang.Object).
| Constructor Summary | |
|---|---|
RootMapModel()
Deprecated. Creates a new model with its own internal map. |
|
RootMapModel(java.util.Map<java.lang.String,TemplateModel> map)
Deprecated. Creates a new model that adds TemplateModelRoot behavior to the
passed map. |
|
| Method Summary | |
|---|---|
TemplateModel |
get(java.lang.String key)
Deprecated. Returns BeansWrapper.wrap(map.get(key))
where map is the underlying Map. |
boolean |
isEmpty()
Deprecated. Returns map.isEmpty() where map is the underlying map. |
void |
put(java.lang.String key,
TemplateModel model)
Deprecated. Puts the specified template model into the map. |
void |
remove(java.lang.String key)
Deprecated. Removes the template model with the specified key from the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RootMapModel()
public RootMapModel(java.util.Map<java.lang.String,TemplateModel> map)
TemplateModelRoot behavior to the
passed map.
| Method Detail |
|---|
public boolean isEmpty()
map.isEmpty() where map is the underlying map.
isEmpty in interface TemplateModeltrue if this object is empty, otherwise falsepublic TemplateModel get(java.lang.String key)
BeansWrapper.wrap(map.get(key))
where map is the underlying Map.
get in interface TemplateHashModelkey - the name by which the TemplateModel
is identified in the template.
TemplateModel referred to by the key,
or null if not found.
public void put(java.lang.String key,
TemplateModel model)
put in interface TemplateModelRootput in interface TemplateWriteableHashModelkey - the hash key.model - the hash value to be added.public void remove(java.lang.String key)
remove in interface TemplateModelRootkey - the key to be removed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||