freemarker.template
Interface TemplateNumberModel

All Superinterfaces:
TemplateModel
All Known Implementing Classes:
FastBoolean, FastNumber, SimpleNumber

public interface TemplateNumberModel
extends TemplateModel

Numeric values in a template data model must implement this interface.

The detail messages of any TemplateModelExceptions thrown will be included as HTML comments in the output.

Since:
1.8
See Also:
TemplateScalarModel

Method Summary
 long getAsNumber()
          Returns the number's value as a long.
 
Methods inherited from interface freemarker.template.TemplateModel
isEmpty
 

Method Detail

getAsNumber

long getAsNumber()
                 throws TemplateModelException
Returns the number's value as a long.

Returns:
the long value of this scalar.
Throws:
TemplateModelException