Class Max
- java.lang.Object
-
- net.sourceforge.jeval.function.math.Max
-
- All Implemented Interfaces:
Function
public class Max extends java.lang.Object implements Function
This class is a function that executes within Evaluator. The function returns the greater of two double values. See the Math.max(double) method in the JDK for a complete description of how this function works.
-
-
Constructor Summary
Constructors Constructor Description Max()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionResult
execute(Evaluator evaluator, java.lang.String arguments)
Executes the function for the specified argument.java.lang.String
getName()
Returns the name of the function - "max".
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the function - "max".
-
execute
public FunctionResult execute(Evaluator evaluator, java.lang.String arguments) throws FunctionException
Executes the function for the specified argument. This method is called internally by Evaluator.- Specified by:
execute
in interfaceFunction
- Parameters:
evaluator
- An instance of Evaluator.arguments
- A string argument that will be converted into two double values and evaluated.- Returns:
- The greater of two values.
- Throws:
FunctionException
- if the argument(s) are not valid for this function
-
-