Class NumberModel

java.lang.Object
freemarker.ext.beans.BeanModel
freemarker.ext.beans.NumberModel
All Implemented Interfaces:
WrapperTemplateModel, AdapterTemplateModel, TemplateHashModel, TemplateHashModelEx, TemplateModel, TemplateModelWithAPISupport, TemplateNumberModel

public class NumberModel extends BeanModel implements TemplateNumberModel
Wraps arbitrary subclass of Number into a reflective model. Beside acting as a TemplateNumberModel, you can call all Java methods on these objects as well.
  • Constructor Details

    • NumberModel

      public NumberModel(Number number, BeansWrapper wrapper)
      Creates a new model that wraps the specified number object.
      Parameters:
      number - the number object to wrap into a model.
      wrapper - the BeansWrapper associated with this model. Every model has to have an associated BeansWrapper instance. The model gains many attributes from its wrapper, including the caching behavior, method exposure level, method-over-item shadowing policy etc.
  • Method Details