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
Evaluator for mathematical function XYZ(numExpr).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(InvokeExpression expr, Object invokedValue, InMemoryExpressionEvaluator eval) Method to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.protected abstract double
evaluateMathFunction
(double num) protected double
evaluateMathFunction
(double num1, double num2) protected abstract String
protected Object
getParamValueForParam
(Object param, InMemoryExpressionEvaluator eval, String method)
-
Constructor Details
-
MathFunction
public MathFunction()
-
-
Method Details
-
evaluate
public Object evaluate(InvokeExpression expr, Object invokedValue, InMemoryExpressionEvaluator eval) Description copied from interface:InvocationEvaluator
Method to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.- Specified by:
evaluate
in interfaceInvocationEvaluator
- Parameters:
expr
- The expression for invocationinvokedValue
- Value on which we are invokingeval
- The overall evaluator for in-memory- Returns:
- The result
-
getFunctionName
-
evaluateMathFunction
protected abstract double evaluateMathFunction(double num) -
evaluateMathFunction
protected double evaluateMathFunction(double num1, double num2) -
getParamValueForParam
protected Object getParamValueForParam(Object param, InMemoryExpressionEvaluator eval, String method)
-