Package net.sourceforge.jeval.function
Interface Function
-
- All Known Implementing Classes:
Abs
,Acos
,Asin
,Atan
,Atan2
,Ceil
,CharAt
,CompareTo
,CompareToIgnoreCase
,Concat
,Cos
,EndsWith
,Equals
,EqualsIgnoreCase
,Eval
,Exp
,Floor
,IEEEremainder
,IndexOf
,LastIndexOf
,Left
,Length
,Log
,Max
,Min
,Pow
,Random
,RegexMatches
,Replace
,ReplaceOnce
,ReplaceStr
,Right
,Rint
,Round
,Sin
,Split
,Sqrt
,StartsWith
,Substring
,Tan
,TextLines
,ToDegrees
,ToLowerCase
,ToRadians
,ToUpperCase
,Trim
public interface Function
A function that can be specified in an expression.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the function.- Returns:
- The name of this function class.
-
execute
FunctionResult execute(Evaluator evaluator, java.lang.String arguments) throws FunctionException
Executes the function for the specified argument. This method is called internally by Evaluator.- Parameters:
evaluator
- An instance of Evaluator.arguments
- The arguments that will be evaluated by the function. It is up to the function implementation to break the string into one or more arguments.- Returns:
- The value of the evaluated argument and its type.
- Throws:
FunctionException
- thrown if the argument(s) are not valid for this function
-
-