]> gerrit.simantics Code Review - simantics/r.git/blob - org.simantics.r.scl/src/org/rosuda/REngine/REXPUnknown.java
(refs #6833) Test RExp inheritance in SCL
[simantics/r.git] / org.simantics.r.scl / src / org / rosuda / REngine / REXPUnknown.java
1 package org.rosuda.REngine;
2
3 /** REXPUnknown is a stand-in for an object that cannot be represented in the REngine hierarchy. Usually this class can be encountered when new types are introduced in R or if a given engine doesn't support all data types. Usually REXPUnknown can only be retrieved from the engine but never assigned. */
4 public class REXPUnknown extends REXP {
5         /** type of the unterlying obejct */
6         int type;
7
8         /** creates a new unknown object of the given type
9          *  @param type internal R type code of this object */
10         public REXPUnknown(int type) { super(); this.type=type; }
11
12         /** creates a new unknown object of the given type
13          *  @param type internal R type code of this object
14          *  @param attr attributes */
15         public REXPUnknown(int type, REXPList attr) { super(attr); this.type=type; }
16         
17         /** returns the internal R type of this unknown obejct
18          *  @return type code */
19         public int getType() { return type; }
20         
21         public String toString() {
22                 return super.toString()+"["+type+"]";
23         }
24 }