net.sf.arise.piji
Interface Function

All Known Implementing Classes:
AbstractFunction, LambdaWrapper

public interface Function

A common interface for scheme functions

Author:
Kjetil Valstadsve

Method Summary
 java.lang.Object apply(Context context, Expression[] nodes)
          Applies the function to a set of values in a given context and returns the result
 int getArgumentCount()
          Gets the minimum number of required arguments
 Context getContext()
          Gets the definition context
 java.lang.String getDocumentationString()
          Returns a documentation string
 boolean isVararg()
          Returns true iff this function is vararg, ie.
 

Method Detail

isVararg

public boolean isVararg()
Returns true iff this function is vararg, ie. has alt upward bound on the number of arguments

Returns:
True iff this function is vararg

getArgumentCount

public int getArgumentCount()
Gets the minimum number of required arguments

Returns:
The number of required arguments

getDocumentationString

public java.lang.String getDocumentationString()
Returns a documentation string

Returns:
A documentation string

getContext

public Context getContext()
Gets the definition context

Returns:
The definition conetxt

apply

public java.lang.Object apply(Context context,
                              Expression[] nodes)
                       throws java.lang.Throwable
Applies the function to a set of values in a given context and returns the result

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


All code and documentation is

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