Calculable
de.congrace.exp4j

Interface Calculable



  • public interface Calculable
    This is the basic result class of the exp4j ExpressionBuilder
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      doublecalculate()
      calculate the result of the expression
      doublecalculate(double... variableValues)
      calculate the result of the expression
      StringgetExpression()
      return the expression in reverse polish postfix notation
      voidsetVariable(String name, double value)
      set a variable value for the calculation
    • Method Detail

      • calculate

        double calculate()
        calculate the result of the expression
        Returns:
        the result of the calculation
      • calculate

        double calculate(double... variableValues)
        calculate the result of the expression
        Parameters:
        variableValues - the values of the variable. The values must be in the same order as the declaration of variables in the ExpressionBuilder used to construct this Calculable instance
        Returns:
        the result of the calculation
      • getExpression

        String getExpression()
        return the expression in reverse polish postfix notation
        Returns:
        the expression used to construct this Calculable
      • setVariable

        void setVariable(String name,               double value)
        set a variable value for the calculation
        Parameters:
        name - the variable name
        value - the value of the variable

SCaVis 2.0 © jWork.ORG