|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.ext.beans.BeanModelBase | +--freemarker.ext.beans.BeanModel | +--freemarker.ext.beans.NumberModel
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.
Fields inherited from class freemarker.ext.beans.BeanModel |
TYPE_ARRAY, TYPE_COLLECTION, TYPE_ENUMERATION, TYPE_ITERATOR, TYPE_MAP, TYPE_OBJECT, TYPE_OBJECT_BASE, TYPE_RESOURCE_BUNDLE |
Constructor Summary | |
NumberModel(java.lang.Number number)
Creates a new model that wraps the specified number object. |
Method Summary | |
java.lang.Number |
getAsNumber()
Returns the number. |
static NumberModel |
getInstance(java.lang.Number object)
Returns a model wrapping the specified number object. |
Methods inherited from class freemarker.ext.beans.BeanModel |
get, getAsString, getInstance, getInstance, getObject, getType, invokeGenericGet, isEmpty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface freemarker.template.TemplateScalarModel |
getAsString |
Methods inherited from interface freemarker.template.TemplateModel |
isEmpty |
Constructor Detail |
public NumberModel(java.lang.Number number)
object
- the number object to wrap into a model.Method Detail |
public java.lang.Number getAsNumber()
TemplateNumberModel
getAsNumber
in interface TemplateNumberModel
freemarker.template.TemplateNumberModel
public static NumberModel getInstance(java.lang.Number object)
WeakReference
objects. The caching can be turned
off by setting the freemarker.beans.nocache system property to
true. In this case calling this method is equivalent to constructing a new model.object
- the number to wrap into a model.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |