{{tag>Index Programmers_Reference Methods IFunctionLibrary_Interface Calculate}} ====calculate (String, Object [], INodeHelper)==== public Object calculate (String functionName, Object [] parameters, INodeHelper helper) This method is what the function is all about – it performs the required calculation and returns the result. ===Parameters=== |''functionName''|the name of the function in the library that needs to be calculated| |''parameters''|the values of function parameters as specified in a rule where the function is used. The given array contains Java objects corresponding to different attribute types (''String'', ''Integer'', ''DateHolder'' etc – see a complete list in the [[docs:3500:appendix_a|Appendix A]])| |''helper''|a call-back interface. Should not be used by custom function libraries.| ===Returns=== The result of the calculation as a Java object of the type corresponding to the attribute types – see [[docs:3500:appendix_a|Appendix A]]. If the function value cannot be calculated for whatever reason (for example, the number of parameters or their types are wrong), ''null'' should be returned.