Class Equ<T>


  • public class Equ<T>
    extends Object
    Create an instance of this class and send it an evaluate() message. The result will always be an instance of Double or String or ZonedDateTime.
    You can also register your own functions and operators by calling the static methods registerFunction and registerOperator. These add to a static Map so there are then available for the duration of your application.
    A support instance can be handed to an instance of Equ with the setSupport() method. This must be done prior to calling evaluate. When a variable is found in the equation then the support instance is asked to instantiate the variable. It is expected that it will do what is necessary to come up with it. The test cases show a support instance that maintains a local Map of variable name / value pairs. But a database could be used as well.