Documentation of 'jhplot.math.exp4j.ExpressionBuilder' Java class.
ExpressionBuilder
jhplot.math.exp4j

Class ExpressionBuilder



  • public class ExpressionBuilder
    extends java.lang.Object
    Factory class for Expression instances. This class is the main API entrypoint. Users should create new Expression instances using this factory class.
    • Constructor Detail

      • ExpressionBuilder

        public ExpressionBuilder(java.lang.String expression)
        Create a new ExpressionBuilder instance and initialize it with a given expression string.
        Parameters:
        expression - the expression to be parsed
    • Method Detail

      • function

        public ExpressionBuilder function(Function function)
        Add a Function implementation available for use in the expression
        Parameters:
        function - the custom Function implementation that should be available for use in the expression.
        Returns:
        the ExpressionBuilder instance
      • functions

        public ExpressionBuilder functions(Function... functions)
        Add multiple Function implementations available for use in the expression
        Parameters:
        functions - the custom Function implementations
        Returns:
        the ExpressionBuilder instance
      • functions

        public ExpressionBuilder functions(java.util.List<Function> functions)
        Add multiple Function implementations available for use in the expression
        Parameters:
        functions - A List of custom Function implementations
        Returns:
        the ExpressionBuilder instance
      • variables

        public ExpressionBuilder variables(java.util.Set<java.lang.String> variableNames)
      • operator

        public ExpressionBuilder operator(Operator operator)
        Add an Operator which should be available for use in the expression
        Parameters:
        operator - the custom Operator to add
        Returns:
        the ExpressionBuilder instance
      • operator

        public ExpressionBuilder operator(Operator... operators)
        Add multiple Operator implementations which should be available for use in the expression
        Parameters:
        operators - the set of custom Operator implementations to add
        Returns:
        the ExpressionBuilder instance
      • operator

        public ExpressionBuilder operator(java.util.List<Operator> operators)
        Add multiple Operator implementations which should be available for use in the expression
        Parameters:
        operators - the List of custom Operator implementations to add
        Returns:
        the ExpressionBuilder instance
      • build

        public Expression build()
        Build the Expression instance using the custom operators and functions set.
        Returns:
        an Expression instance which can be used to evaluate the result of the expression

DMelt 3.0 © DataMelt by jWork.ORG