Package freemarker.ext.servlet
Class HttpRequestParametersHashModel
- java.lang.Object
-
- freemarker.ext.servlet.HttpRequestParametersHashModel
-
- All Implemented Interfaces:
TemplateHashModel,TemplateHashModelEx,TemplateModel
public class HttpRequestParametersHashModel extends java.lang.Object implements TemplateHashModelEx
TemplateHashModel wrapper for a HttpServletRequest parameters.
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
-
Constructor Summary
Constructors Constructor Description HttpRequestParametersHashModel(javax.servlet.http.HttpServletRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateModelget(java.lang.String key)Gets a TemplateModel from the hash.booleanisEmpty()TemplateCollectionModelkeys()intsize()protected java.lang.Stringtranscode(java.lang.String string)TemplateCollectionModelvalues()
-
-
-
Method Detail
-
get
public TemplateModel get(java.lang.String key)
Description copied from interface:TemplateHashModelGets a TemplateModel from the hash.- Specified by:
getin interfaceTemplateHashModel- 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.
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceTemplateHashModel
-
size
public int size()
- Specified by:
sizein interfaceTemplateHashModelEx- Returns:
- the number of key/value mappings in the hash.
-
keys
public TemplateCollectionModel keys()
- Specified by:
keysin interfaceTemplateHashModelEx- Returns:
- a collection containing the keys in the hash. Every element of
the returned collection must implement the
TemplateScalarModel(as the keys of hashes are always strings).
-
values
public TemplateCollectionModel values()
- Specified by:
valuesin interfaceTemplateHashModelEx- Returns:
- a collection containing the values in the hash. The elements of the
returned collection can be any kind of
TemplateModel-s.
-
transcode
protected java.lang.String transcode(java.lang.String string)
-
-