com.japisoft.formula.lib
Class Function

java.lang.Object
  |
  +--com.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

Constructor Summary
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)
           
 java.lang.String toString()
           
 java.lang.String toString(java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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

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()
Overrides:
toString in class java.lang.Object