Class MathFunction
- java.lang.Object
-
- org.datanucleus.store.query.inmemory.method.MathFunction
-
- All Implemented Interfaces:
InvocationEvaluator
- Direct Known Subclasses:
AbsFunction,ArcCosineFunction,ArcSineFunction,ArcTangent2Function,ArcTangentFunction,CeilFunction,CoshFunction,CosineFunction,CotangentFunction,DegreesFunction,ExpFunction,FloorFunction,LogFunction,RadiansFunction,SignFunction,SineFunction,SinhFunction,SqrtFunction,TangentFunction,TanhFunction
public abstract class MathFunction extends java.lang.Object implements InvocationEvaluator
Evaluator for mathematical function XYZ(numExpr).
-
-
Constructor Summary
Constructors Constructor Description MathFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectevaluate(InvokeExpression expr, java.lang.Object invokedValue, InMemoryExpressionEvaluator eval)Method to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.protected abstract doubleevaluateMathFunction(double num)protected doubleevaluateMathFunction(double num1, double num2)protected abstract java.lang.StringgetFunctionName()protected java.lang.ObjectgetParamValueForParam(java.lang.Object param, InMemoryExpressionEvaluator eval, java.lang.String method)
-
-
-
Method Detail
-
evaluate
public java.lang.Object evaluate(InvokeExpression expr, java.lang.Object invokedValue, InMemoryExpressionEvaluator eval)
Description copied from interface:InvocationEvaluatorMethod to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.- Specified by:
evaluatein interfaceInvocationEvaluator- Parameters:
expr- The expression for invocationinvokedValue- Value on which we are invokingeval- The overall evaluator for in-memory- Returns:
- The result
-
getFunctionName
protected abstract java.lang.String getFunctionName()
-
evaluateMathFunction
protected abstract double evaluateMathFunction(double num)
-
evaluateMathFunction
protected double evaluateMathFunction(double num1, double num2)
-
getParamValueForParam
protected java.lang.Object getParamValueForParam(java.lang.Object param, InMemoryExpressionEvaluator eval, java.lang.String method)
-
-