net.sf.arise.piji
Class Lambda

java.lang.Object
  |
  +--net.sf.arise.piji.AbstractFunction
        |
        +--net.sf.arise.piji.Lambda
All Implemented Interfaces:
Function

public final class Lambda
extends AbstractFunction


Method Summary
 java.lang.Object apply(Context context, Expression[] args)
          Applies the function to a set of values in a given context and returns the result
static Lambda create(Context context, Expression[] expr, int offset, int formalsOffset)
           
 int getArgumentCount()
          Gets the minimum number of required arguments
 java.lang.String toString()
           
 
Methods inherited from class net.sf.arise.piji.AbstractFunction
checkArgumentCount, checkLeaf, checkLeaf, checkList, checkList, checkString, checkString, checkSymbol, checkSymbol, checkSymbol, checkSymbol, fillContext, fillContext, getContext, getDocumentationString, isLeaf, isList, isString, isSymbol, isVararg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Lambda create(Context context,
                            Expression[] expr,
                            int offset,
                            int formalsOffset)
                     throws BadArgumentException
BadArgumentException

getArgumentCount

public int getArgumentCount()
Description copied from interface: Function
Gets the minimum number of required arguments

Specified by:
getArgumentCount in interface Function
Overrides:
getArgumentCount in class AbstractFunction
Returns:
The number of required arguments

apply

public java.lang.Object apply(Context context,
                              Expression[] args)
                       throws java.lang.Throwable
Description copied from interface: Function
Applies the function to a set of values in a given context and returns the result

Specified by:
apply in interface Function
Specified by:
apply in class AbstractFunction
Parameters:
context - The context to apply this function in
Returns:
The result of the function applied to the arguments in the context
java.lang.Throwable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


All code and documentation is

Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth