org.omegahat.Environment.lib.Language
Class VarSequenceFunctions

java.lang.Object
  |
  +--org.omegahat.Environment.lib.Language.VarSequenceFunctions
All Implemented Interfaces:
VarArgsFunctionTable

public class VarSequenceFunctions
extends java.lang.Object
implements VarArgsFunctionTable

Static function-like methods to be used in the interpreted language (and in regular compiled code) to concatenate objects, etc. similr to the c() and list() functions in R and S.


Constructor Summary
VarSequenceFunctions()
           
 
Method Summary
static java.lang.Object[] append(java.lang.Object[] ans, java.lang.Object[] tmp, int start)
           
static java.lang.Object[] append(java.lang.Object[] ans, java.lang.Object el, int start, boolean within, Evaluator evaluator)
           
static java.lang.Object c(java.util.Hashtable tb, Evaluator evaluator)
          Simple version that returns a hashtable unaltered, for use in named argument lists such as
static java.lang.Object c(List args, Evaluator evaluator)
          This is similar to the c() function in S and R, concatenating its two arguments.
static java.lang.Object c(List args, Evaluator evaluator, boolean within)
           
static int getLength(java.lang.Object el, Evaluator evaluator)
          Determines the length of a particular object, treating arrays and collection objects appropriately.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarSequenceFunctions

public VarSequenceFunctions()
Method Detail

c

public static java.lang.Object c(List args,
                                 Evaluator evaluator)
                          throws java.lang.Throwable
This is similar to the c() function in S and R, concatenating its two arguments.

c

public static java.lang.Object c(List args,
                                 Evaluator evaluator,
                                 boolean within)
                          throws java.lang.Throwable

c

public static java.lang.Object c(java.util.Hashtable tb,
                                 Evaluator evaluator)
                          throws java.lang.Throwable
Simple version that returns a hashtable unaltered, for use in named argument lists such as
c(x=1, 2, "foobar")

append

public static java.lang.Object[] append(java.lang.Object[] ans,
                                        java.lang.Object el,
                                        int start,
                                        boolean within,
                                        Evaluator evaluator)
                                 throws java.lang.Throwable

append

public static java.lang.Object[] append(java.lang.Object[] ans,
                                        java.lang.Object[] tmp,
                                        int start)

getLength

public static int getLength(java.lang.Object el,
                            Evaluator evaluator)
Determines the length of a particular object, treating arrays and collection objects appropriately.