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

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

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

int content or 0 if the REXP is no integer

Definition at line 459 of file REXP.java.

References cont, Xt, XT_ARRAY_INT, and XT_INT.

Referenced by asIntArray(), and getBinaryRepresentation().

        if (Xt==XT_ARRAY_INT) {
            int i[]=(int[])cont;
            if (i!=null && i.length>0) return i[0];
        return (Xt==XT_INT)?((Integer)cont).intValue():0;

Generated by  Doxygen 1.6.0   Back to index