freemarker.template
Interface TemplateNumberModel

All Superinterfaces:
TemplateModel
All Known Implementing Classes:
FastBoolean, FastNumber, NumberModel, NumberWrapper, SimpleNumber, SimpleNumberModel

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
Version:
$Id: TemplateNumberModel.java 1101 2013-04-01 04:17:32Z run2000 $
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