Data Models

Scalar Model

Scalars are the most simple of the TemplateModels. A scalar model simply returns a single value as a String.

The one method that TemplateScalarModel declares is:

public java.lang.String getAsString()
                             throws TemplateModelException;

If for some reason you need to return a null string, getAsString() can safely return a null value.