]> gerrit.simantics Code Review - simantics/r.git/blob - org.simantics.r.scl/src/org/rosuda/REngine/REXPSymbol.java
fc589f8c213cc135db3ac9a02ecb1ccfde62af17
[simantics/r.git] / org.simantics.r.scl / src / org / rosuda / REngine / REXPSymbol.java
1 package org.rosuda.REngine;
2
3 /** REXPSymbol represents a symbol in R. */
4 public class REXPSymbol extends REXP {
5         /** name of the symbol */
6         private String name;
7         
8         /** create a new symbol of the given name */
9         public REXPSymbol(String name) {
10                 super();
11                 this.name=(name==null)?"":name;
12         }
13         
14         public boolean isSymbol() { return true; }
15         
16         /** returns the name of the symbol
17          *  @return name of the symbol */
18         public String asString() { return name; }
19
20         public String[] asStrings() {
21                 return new String[] { name };
22         }
23         
24         public String toString() {
25                 return getClass().getName()+"["+name+"]";
26         }
27
28         public String toDebugString() {
29                 return super.toDebugString()+"["+name+"]";
30         }
31
32         public Object asNativeJavaObject() {
33                 return name;
34         }
35 }