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

int [] org::rosuda::JRclient::REXP::asIntArray (  )  [inline]

get content of the REXP as an array of integers. Unlike asDoubleArray <u>NO</u> automatic conversion is done if the content is not an array of the correct type, because there is no canonical representation of doubles as integers. A single integer is returned as an array of the length 1.

double[] content or null if the REXP is not a array of integers

Definition at line 526 of file REXP.java.

References asInt(), cont, Xt, XT_ARRAY_INT, and XT_INT.

Referenced by asDoubleArray(), and asDoubleMatrix().

        if (Xt==XT_ARRAY_INT) return (int[])cont;
        if (Xt==XT_INT) {
            int[] i=new int[1]; i[0]=asInt(); return i;
        return null;

Generated by  Doxygen 1.6.0   Back to index