com.dandymadeproductions.expressionparser.functions
Class Function

java.lang.Object
  extended by com.dandymadeproductions.expressionparser.functions.Function
Direct Known Subclasses:
OneArgFunction, TwoArgFunction

public abstract class Function
extends java.lang.Object

Abstract class type for functions. Each function needs to specify the number of arguments in its variable list. The Function prototype can take at most two arguments. Functions with more arguments can be represented by multiple function pairs.

Version:
1.5 02/12/2012
Author:
David Wanqian Liu, Dana M. Proctor

Field Summary
 int numArgs
           
 
Constructor Summary
Function()
           
 
Method Summary
abstract  Complex apply(Complex a)
           
abstract  Complex apply(Complex a, Complex b)
           
abstract  double apply(double a)
           
abstract  double apply(double a, double b)
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numArgs

public int numArgs
Constructor Detail

Function

public Function()
Method Detail

apply

public abstract double apply(double a)

apply

public abstract Complex apply(Complex a)

apply

public abstract double apply(double a,
                             double b)

apply

public abstract Complex apply(Complex a,
                              Complex b)

toString

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