TemplateHashModelEx (FreeMarker 2.3.23 API)
Date: 2015-07-05

freemarker.template

## Interface TemplateHashModelEx

- All Superinterfaces:
    TemplateHashModel, TemplateModel
  All Known Implementing Classes:
    AllHttpScopesHashModel, ArrayModel, BeanModel, BooleanModel, CollectionModel, DateModel, DefaultMapAdapter, EnumerationModel, Environment.Namespace, HttpRequestHashModel, HttpRequestParametersHashModel, IteratorModel, JythonHashModel, MapModel, NumberModel, ResourceBundleModel, RhinoFunctionModel, RhinoScriptableModel, SimpleHash, SimpleMapModel, StringModel

      public interface TemplateHashModelEx
      extends TemplateHashModel

  "extended hash" template language data type; extends `TemplateHashModel` by allowing iterating through its keys and values.

  In templates they are used like hashes, but these will also work (among others): `myExtHash?size`, `myExtHash?keys`, `myExtHash?values`.

  See Also:
    `SimpleHash`

- - ### Field Summary

    - ### Fields inherited from interface freemarker.template.TemplateModel

      `NOTHING`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `TemplateCollectionModel` | `keys()`
    `int` | `size()`
    `TemplateCollectionModel` | `values()`

    - ### Methods inherited from interface freemarker.template.TemplateHashModel

      `get, isEmpty`

- - ### Method Detail

    - #### size

          int size()
            throws TemplateModelException

      Returns:
        the number of key/value mappings in the hash.
      Throws:
        `TemplateModelException`

    - #### keys

          TemplateCollectionModel keys()
                                throws TemplateModelException

      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).
      Throws:
        `TemplateModelException`

    - #### values

          TemplateCollectionModel values()
                                  throws TemplateModelException

      Returns:
        a collection containing the values in the hash. The elements of the returned collection can be any kind of `TemplateModel`-s.
      Throws:
        `TemplateModelException`