de.congrace.exp4j
Interface Calculable


public interface Calculable

This is the basic result class of the exp4j ExpressionBuilder

Author:
frank asseg

Method Summary
 double calculate()
          calculate the result of the expression
 double calculate(double... variableValues)
          calculate the result of the expression
 String getExpression()
          return the expression in reverse polish postfix notation
 void setVariable(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


Copyright © 2012. All Rights Reserved.