|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.ext.jython.JythonModel
freemarker.ext.jython.JythonNumberModel
Model for Jython numeric objects (PyInteger
, PyLong
,
PyFloat
).
Field Summary |
Fields inherited from class freemarker.ext.jython.JythonModel |
object, wrapper |
Fields inherited from interface freemarker.template.TemplateModel |
NOTHING |
Fields inherited from interface freemarker.template.TemplateBooleanModel |
FALSE, TRUE |
Fields inherited from interface freemarker.template.TemplateScalarModel |
EMPTY_STRING |
Constructor Summary | |
JythonNumberModel(org.python.core.PyObject object,
JythonWrapper wrapper)
|
Method Summary | |
java.lang.Number |
getAsNumber()
Returns either PyObject.__tojava__(java.lang.Class) with
Number .class as argument. |
Methods inherited from class freemarker.ext.jython.JythonModel |
exec, get, getAsBoolean, getAsString, getWrappedObject, isEmpty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JythonNumberModel(org.python.core.PyObject object, JythonWrapper wrapper)
Method Detail |
public java.lang.Number getAsNumber() throws TemplateModelException
PyObject.__tojava__(java.lang.Class)
with
Number
.class as argument. If that fails, returns
PyObject.__float__()
.
getAsNumber
in interface TemplateNumberModel
Number
instance associated with this number model.
TemplateModelException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |