net.christopherschultz.evaluator.function
Class MathFunction

java.lang.Object
  extended by net.christopherschultz.evaluator.StandardFunction
      extended by net.christopherschultz.evaluator.function.MathFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
BinaryOperator, Difference, MathFunction.DoubleFunction, MathFunction.heaviside, Summation

public abstract class MathFunction
extends StandardFunction

Implementations of standard mathematical functions.

Version:
$Revision: 1.10 $ $Date: 2008-06-20 22:58:48 $
Author:
Chris Schultz

Nested Class Summary
static class MathFunction.abs
           
static class MathFunction.acos
           
static class MathFunction.asin
           
static class MathFunction.atan
           
static class MathFunction.ceil
           
static class MathFunction.cos
           
static class MathFunction.DoubleFunction
           
static class MathFunction.exp
           
static class MathFunction.floor
           
static class MathFunction.heaviside
          Implements a heaviside function which takes a numeric or boolean argument.
static class MathFunction.log
           
static class MathFunction.max
          This class respects the value of the ALLOW_NULL_COMPARISON property.
static class MathFunction.min
          This class respects the value of the ALLOW_NULL_COMPARISON property.
static class MathFunction.pow
           
static class MathFunction.random
           
static class MathFunction.rint
           
static class MathFunction.sin
           
static class MathFunction.sqrt
           
static class MathFunction.tan
           
static class MathFunction.toDegrees
           
static class MathFunction.toRadians
           
 
Field Summary
static String ALLOW_NULL_COMPARISON
           This Boolean evaluation property will change the way that comparison functions work.
static String NULL_RETURNS_NULL
           This Boolean evaluation property will change the way that mathematical functions work.
 
Constructor Summary
MathFunction()
           
 
Method Summary
 
Methods inherited from class net.christopherschultz.evaluator.StandardFunction
call, call, getExpressionValue, getExpressionValueArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_RETURNS_NULL

public static final String NULL_RETURNS_NULL

This Boolean evaluation property will change the way that mathematical functions work. If set to TRUE, then when a null is found as any operand, it will cause the function to return null immediately.

If set to FALSE, then functions called with null parameters will do the best they can or throw an exception.

The default is TRUE.


ALLOW_NULL_COMPARISON

public static final String ALLOW_NULL_COMPARISON

This Boolean evaluation property will change the way that comparison functions work. If set to TRUE, then when a null is found as an operand, it will be compared to the other operand. If the two are both null, then equals will return TRUE. Otherwise, it will return FALSE.

If set to FALSE, then any comparison involving a null operand will return null.

The default is FALSE.

Constructor Detail

MathFunction

public MathFunction()