com.japisoft.formula.lib
Class Function

java.lang.Object
  extended bycom.japisoft.formula.lib.Function
Direct Known Subclasses:
AbstractFunction

public abstract class Function
extends java.lang.Object

Function description.

More information at : http://www.japisoft.com

Version:
1.1
Author:
(c) 2002 JAPISoft
See Also:
Lib

Field Summary
protected  boolean anyArguments
           
 
Constructor Summary
protected Function()
           
  Function(java.lang.String functionName)
           
  Function(java.lang.String functionName, java.lang.Class[] argsType)
           
 
Method Summary
abstract  Variant evaluate(ListOfArgument args)
           
 java.lang.Class[] getArgsType()
           
 java.lang.String getFunctionName()
           
 boolean matchArgument(ListOfArgument args)
           
protected  void setArgsType(java.lang.Class[] argsType)
          Update the args type
 java.lang.String toString()
           
 java.lang.String toString(java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

anyArguments

protected boolean anyArguments
Constructor Detail

Function

protected Function()

Function

public Function(java.lang.String functionName,
                java.lang.Class[] argsType)

Function

public Function(java.lang.String functionName)
Method Detail

getFunctionName

public java.lang.String getFunctionName()
Returns:
the current function name

getArgsType

public java.lang.Class[] getArgsType()
Returns:
the parameters type. It can return null for no arguments support

setArgsType

protected void setArgsType(java.lang.Class[] argsType)
Update the args type


evaluate

public abstract Variant evaluate(ListOfArgument args)
Returns:
an evaluation of the function for the following args.
Throws:
FunctionException - if the evaluation is impossible

matchArgument

public boolean matchArgument(ListOfArgument args)
Returns:
true is the current function supports the following arguments. It checks for each argument for sending a response

toString

public java.lang.String toString(java.lang.Class type)

toString

public java.lang.String toString()