com.japisoft.formula.lib.standard
Class AbstractFunction

java.lang.Object
  extended bycom.japisoft.formula.lib.Function
      extended bycom.japisoft.formula.lib.standard.AbstractFunction
Direct Known Subclasses:
AbsFunction, AcosFunction, AsinFunction, AtanFunction, AvgFunction, CeilFunction, CosFunction, DegToRad, ExpFunction, FloorFunction, IntFunction, Log10Function, LogFunction, LognFunction, MaxFunction, MinFunction, Pow, ProdFunction, RadToDeg, RandomFunction, RoundFunction, SinFunction, SqrtFunction, Strcontains, Strget, Strlen, SumFunction, TanFunction

public abstract class AbstractFunction
extends Function

Facilities for the standard library

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

Version:
1.0
Author:
(c) 2002 JAPISoft

Field Summary
static int ANY
          For argument number
 
Fields inherited from class com.japisoft.formula.lib.Function
anyArguments
 
Constructor Summary
protected AbstractFunction(java.lang.String name, java.lang.Class[] argTypes)
           
protected AbstractFunction(java.lang.String name, int nArgs)
           
 
Method Summary
protected  double getFirstArgument(ListOfArgument args)
           
protected  double getSecondArgument(ListOfArgument args)
           
protected  boolean hasDoubleArgument(ListOfArgument args)
           
 
Methods inherited from class com.japisoft.formula.lib.Function
evaluate, getArgsType, getFunctionName, matchArgument, setArgsType, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY

public static final int ANY
For argument number

See Also:
Constant Field Values
Constructor Detail

AbstractFunction

protected AbstractFunction(java.lang.String name,
                           int nArgs)
Parameters:
name - name of the function inside the formula
nArgs - number of double : -1 meaning any argument number

AbstractFunction

protected AbstractFunction(java.lang.String name,
                           java.lang.Class[] argTypes)
Parameters:
name - Name of the function inside the formula
argTypes - List of argument type (for instance new Class[] { String.class, Double.class ] for string followed a double
Method Detail

getFirstArgument

protected double getFirstArgument(ListOfArgument args)
Returns:
the first double argument

getSecondArgument

protected double getSecondArgument(ListOfArgument args)
Returns:
the second double argument

hasDoubleArgument

protected boolean hasDoubleArgument(ListOfArgument args)
Returns:
true for at least one double argument