org.rosuda.REngine
Class REXPSymbol

java.lang.Object
  extended by org.rosuda.REngine.REXP
      extended by org.rosuda.REngine.REXPSymbol

public class REXPSymbol
extends REXP

REXPSymbol represents a symbol in R.


Field Summary
 
Fields inherited from class org.rosuda.REngine.REXP
attr, maxDebugItems
 
Constructor Summary
REXPSymbol(java.lang.String name)
          create a new symbol of the given name
 
Method Summary
 java.lang.Object asNativeJavaObject()
          attempt to represent the REXP by a native Java object and return it.
 java.lang.String asString()
          returns the name of the symbol
 java.lang.String[] asStrings()
          returns the contents as an array of Strings (if supported by the represented object)
 boolean isSymbol()
          check whether the REXP object is a symbol
 java.lang.String toDebugString()
          returns representation that it useful for debugging (e.g. it includes attributes and may include vector values -- see REXP.maxDebugItems)
 java.lang.String toString()
          returns a string description of the object
 
Methods inherited from class org.rosuda.REngine.REXP
_attr, asBytes, asDouble, asDoubleMatrix, asDoubles, asFactor, asInteger, asIntegers, asList, createDataFrame, createDoubleMatrix, dim, getAttribute, hasAttribute, inherits, isComplex, isEnvironment, isExpression, isFactor, isInteger, isLanguage, isList, isLogical, isNA, isNull, isNumeric, isPairList, isRaw, isRecursive, isReference, isString, isVector, length
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

REXPSymbol

public REXPSymbol(java.lang.String name)
create a new symbol of the given name

Method Detail

isSymbol

public boolean isSymbol()
Description copied from class: REXP
check whether the REXP object is a symbol

Overrides:
isSymbol in class REXP
Returns:
true if the receiver is a symbol, false otherwise

asString

public java.lang.String asString()
returns the name of the symbol

Overrides:
asString in class REXP
Returns:
name of the symbol

asStrings

public java.lang.String[] asStrings()
Description copied from class: REXP
returns the contents as an array of Strings (if supported by the represented object)

Overrides:
asStrings in class REXP

toString

public java.lang.String toString()
Description copied from class: REXP
returns a string description of the object

Overrides:
toString in class REXP
Returns:
string describing the object - it can be of an arbitrary form and used only for debugging (do not confuse with REXP.asString() for accessing string REXPs)

toDebugString

public java.lang.String toDebugString()
Description copied from class: REXP
returns representation that it useful for debugging (e.g. it includes attributes and may include vector values -- see REXP.maxDebugItems)

Overrides:
toDebugString in class REXP
Returns:
extended description of the obejct -- it may include vector values

asNativeJavaObject

public java.lang.Object asNativeJavaObject()
Description copied from class: REXP
attempt to represent the REXP by a native Java object and return it. Note that this may lead to loss of information (e.g., factors may be returned as a string array) and attributes are ignored. Not all R types can be converted to native Java objects. Also note that R has no concept of scalars, so vectors of length 1 will always be returned as an arrays (i.e., int[1] and not Integer).

Overrides:
asNativeJavaObject in class REXP