Interface Function

  • All Known Implementing Classes:
    AbstractFunction

    public interface Function
    Definition of a function used in expressions.
    • Method Detail

      • getModule

        java.lang.String getModule()
        Get the module of the function, for example "Math" or "Conversion".
        Returns:
        the module name
      • getConstantDescriptions

        java.lang.String getConstantDescriptions()
        Get the descriptions of the constants in the module.
        Returns:
        the description of the constants
      • getName

        java.lang.String getName()
        Get name of the function, for example "sin" or "int"
        Returns:
        the name
      • calculate

        java.lang.Object calculate​(SymbolTable symbolTable,
                                   java.util.List<ExpressionNode> parameterList)
                            throws JmriException
        Calculate the function
        Parameters:
        symbolTable - the symbol table
        parameterList - a list of parameters for the function
        Returns:
        the result
        Throws:
        JmriException - in case of an error
      • getDescription

        java.lang.String getDescription()
        Get the description of the function in Markdown format
        Returns:
        the description