Logo Search packages:      
Sourcecode: rserve version File versions  Download package

double org::rosuda::JRclient::REXP::asDouble (  )  [inline]

get content of the REXP as double (if it is one)

double content or 0.0 if the REXP is no double

Definition at line 469 of file REXP.java.

References cont, Xt, XT_ARRAY_DOUBLE, and XT_DOUBLE.

Referenced by asDoubleArray(), and getBinaryRepresentation().

        if (Xt==XT_ARRAY_DOUBLE) {
            double d[]=(double[])cont;
            if (d!=null && d.length>0) return d[0];
        return (Xt==XT_DOUBLE)?((Double)cont).doubleValue():0.0;

Generated by  Doxygen 1.6.0   Back to index