|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.python.core.PyObject
org.python.core.PyFloat
public class PyFloat
A builtin python float.
| Nested Class Summary | |
|---|---|
static class |
PyFloat.Format
|
| Nested classes/interfaces inherited from class org.python.core.PyObject |
|---|
PyObject.ConversionException |
| Field Summary | |
|---|---|
static PyFloat.Format |
double_format
|
static PyFloat.Format |
float_format
|
static PyType |
TYPE
|
| Constructor Summary | |
|---|---|
PyFloat(double v)
|
|
PyFloat(float v)
|
|
PyFloat(PyType subtype,
double v)
|
|
| Method Summary | |
|---|---|
PyObject |
__abs__()
Equivalent to the standard Python __abs__ method. |
PyObject |
__add__(PyObject right)
Equivalent to the standard Python __add__ method |
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method. |
java.lang.Object |
__coerce_ex__(PyObject other)
Implements numeric coercion |
PyComplex |
__complex__()
Equivalent to the standard Python __complex__ method. |
PyObject |
__div__(PyObject right)
Equivalent to the standard Python __div__ method |
PyObject |
__divmod__(PyObject right)
Equivalent to the standard Python __divmod__ method |
PyObject |
__eq__(PyObject other)
Equivalent to the standard Python __eq__ method. |
PyFloat |
__float__()
Equivalent to the standard Python __float__ method. |
PyObject |
__floordiv__(PyObject right)
Equivalent to the standard Python __floordiv__ method |
PyTuple |
__getnewargs__()
|
PyObject |
__int__()
Equivalent to the standard Python __int__ method. |
PyObject |
__invert__()
Equivalent to the standard Python __invert__ method. |
PyObject |
__long__()
Equivalent to the standard Python __long__ method. |
PyObject |
__mod__(PyObject right)
Equivalent to the standard Python __mod__ method |
PyObject |
__mul__(PyObject right)
Equivalent to the standard Python __mul__ method |
PyObject |
__ne__(PyObject other)
Equivalent to the standard Python __ne__ method. |
PyObject |
__neg__()
Equivalent to the standard Python __neg__ method. |
boolean |
__nonzero__()
Equivalent to the standard Python __nonzero__ method. |
PyObject |
__pos__()
Equivalent to the standard Python __pos__ method. |
PyObject |
__pow__(PyObject right,
PyObject modulo)
Implements the three argument power function. |
PyObject |
__radd__(PyObject left)
Equivalent to the standard Python __radd__ method |
PyObject |
__rdiv__(PyObject left)
Equivalent to the standard Python __rdiv__ method |
PyObject |
__rdivmod__(PyObject left)
Equivalent to the standard Python __rdivmod__ method |
PyString |
__repr__()
Equivalent to the standard Python __repr__ method. |
PyObject |
__rfloordiv__(PyObject left)
Equivalent to the standard Python __rfloordiv__ method |
PyObject |
__rmod__(PyObject left)
Equivalent to the standard Python __rmod__ method |
PyObject |
__rmul__(PyObject left)
Equivalent to the standard Python __rmul__ method |
PyObject |
__rpow__(PyObject left)
Equivalent to the standard Python __rpow__ method |
PyObject |
__rsub__(PyObject left)
Equivalent to the standard Python __rsub__ method |
PyObject |
__rtruediv__(PyObject left)
Equivalent to the standard Python __rtruediv__ method |
PyString |
__str__()
Equivalent to the standard Python __str__ method. |
PyObject |
__sub__(PyObject right)
Equivalent to the standard Python __sub__ method |
java.lang.Object |
__tojava__(java.lang.Class c)
Equivalent to the Jython __tojava__ method. |
PyObject |
__truediv__(PyObject right)
Equivalent to the standard Python __truediv__ method |
double |
asDouble()
Convert this object into a double. |
static java.lang.String |
float___getformat__(PyType type,
java.lang.String typestr)
|
static void |
float___setformat__(PyType type,
java.lang.String typestr,
java.lang.String format)
|
static PyObject |
float_new(PyNewWrapper new_,
boolean init,
PyType subtype,
PyObject[] args,
java.lang.String[] keywords)
|
double |
getValue()
|
int |
hashCode()
|
boolean |
isFinite()
Determine if this float is not infinity, nor NaN. |
boolean |
isMappingType()
|
boolean |
isSequenceType()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PyType TYPE
public static volatile PyFloat.Format double_format
public static volatile PyFloat.Format float_format
| Constructor Detail |
|---|
public PyFloat(PyType subtype,
double v)
public PyFloat(double v)
public PyFloat(float v)
| Method Detail |
|---|
public static PyObject float_new(PyNewWrapper new_,
boolean init,
PyType subtype,
PyObject[] args,
java.lang.String[] keywords)
public boolean isFinite()
public double getValue()
public java.lang.String toString()
toString in class PyObjectpublic PyString __str__()
PyObjectPyObject is to
override the standard Java toString method.
__str__ in class PyObjectpublic PyString __repr__()
PyObjectPyObject is to
override the standard Java toString method.
__repr__ in class PyObjectpublic int hashCode()
hashCode in class PyObjectpublic boolean __nonzero__()
PyObjectPyObject is considered true.
__nonzero__ in class PyObjectpublic java.lang.Object __tojava__(java.lang.Class c)
PyObjectPy.NoConversion
if this PyObject can not be converted to the
desired Java class.
__tojava__ in class PyObjectc - the Class to convert this PyObject to.public PyObject __eq__(PyObject other)
PyObject
__eq__ in class PyObjectother - the object to compare this with.
public PyObject __ne__(PyObject other)
PyObject
__ne__ in class PyObjectother - the object to compare this with.
public int __cmp__(PyObject other)
PyObject
__cmp__ in class PyObjectother - the object to compare this with.
public java.lang.Object __coerce_ex__(PyObject other)
PyObject
__coerce_ex__ in class PyObjectother - the other object involved in the coercion
public PyObject __add__(PyObject right)
PyObject
__add__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __radd__(PyObject left)
PyObject
__radd__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __sub__(PyObject right)
PyObject
__sub__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rsub__(PyObject left)
PyObject
__rsub__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __mul__(PyObject right)
PyObject
__mul__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmul__(PyObject left)
PyObject
__rmul__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __div__(PyObject right)
PyObject
__div__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rdiv__(PyObject left)
PyObject
__rdiv__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __floordiv__(PyObject right)
PyObject
__floordiv__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rfloordiv__(PyObject left)
PyObject
__rfloordiv__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __truediv__(PyObject right)
PyObject
__truediv__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rtruediv__(PyObject left)
PyObject
__rtruediv__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __mod__(PyObject right)
PyObject
__mod__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmod__(PyObject left)
PyObject
__rmod__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __divmod__(PyObject right)
PyObject
__divmod__ in class PyObjectright - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rdivmod__(PyObject left)
PyObject
__rdivmod__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __pow__(PyObject right,
PyObject modulo)
PyObject
__pow__ in class PyObjectright - the power to raise this number to.modulo - the modulus to perform this operation in or null if no
modulo is to be used
public PyObject __rpow__(PyObject left)
PyObject
__rpow__ in class PyObjectleft - the object to perform this binary operation with
(the left-hand operand).
public PyObject __neg__()
PyObject
__neg__ in class PyObjectpublic PyObject __pos__()
PyObject
__pos__ in class PyObjectpublic PyObject __invert__()
PyObject
__invert__ in class PyObjectpublic PyObject __abs__()
PyObject
__abs__ in class PyObjectpublic PyObject __int__()
PyObject
__int__ in class PyObjectpublic PyObject __long__()
PyObject
__long__ in class PyObjectpublic PyFloat __float__()
PyObject
__float__ in class PyObjectpublic PyComplex __complex__()
PyObject
__complex__ in class PyObjectpublic PyTuple __getnewargs__()
__getnewargs__ in class PyObjectpublic double asDouble()
PyObject
asDouble in class PyObject
public static java.lang.String float___getformat__(PyType type,
java.lang.String typestr)
public static void float___setformat__(PyType type,
java.lang.String typestr,
java.lang.String format)
public boolean isMappingType()
isMappingType in class PyObjectpublic boolean isSequenceType()
isSequenceType in class PyObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||