|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans.ObjectModelBase
freemarker.ext.beans.ObjectModel
freemarker.ext.beans.MapModel
freemarker.ext.beans2 package
public class MapModel
A special case of ObjectModel that adds implementation
for TemplateMethodModel2 on map objects that is a
shortcut for the Map.get() method.
You can use map.entrySet, map.keySet, or
map.values to obtain TemplateListModel2 instances
for various aspects of the map.
| Field Summary |
|---|
| Fields inherited from class freemarker.ext.beans.ObjectModelBase |
|---|
object |
| Constructor Summary | |
|---|---|
MapModel(java.util.Map map)
Deprecated. Creates a new model that wraps the specified map object. |
|
| Method Summary | |
|---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Deprecated. The first argument is used as a key to call the map's get method. |
static MapModel |
getInstance(java.util.Map object)
Deprecated. Returns a model wrapping the specified map object. |
freemarker.ext.beans.ObjectModelBase.ModelType |
getType()
Deprecated. Returns the type of this object (which is TYPE_MAP) |
boolean |
isEmpty()
Deprecated. Returns true if the underlying map is empty. |
| Methods inherited from class freemarker.ext.beans.ObjectModel |
|---|
get, getInstance |
| Methods inherited from class freemarker.ext.beans.ObjectModelBase |
|---|
getAsObject, getAsString, getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapModel(java.util.Map map)
map - the map object to wrap into a model.| Method Detail |
|---|
public static final MapModel getInstance(java.util.Map object)
WeakReference objects. The caching can be turned
off by setting the expose.reflection.nocache system property to
true. In this case calling this method is equivalent to constructing a new model.
object - the map to wrap into a model.
public freemarker.ext.beans.ObjectModelBase.ModelType getType()
getType in class ObjectModel
public TemplateModel exec(java.util.List<TemplateModel> arguments)
throws TemplateModelException
get method.
exec in interface TemplateMethodModel2arguments - a List of TemplateModel objects
containing the values of the arguments passed to the method.
TemplateModel produced by the method, or null.
TemplateModelExceptionpublic boolean isEmpty()
isEmpty in interface TemplateModelisEmpty in class ObjectModelBasetrue if this object is empty, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||