public class CalcFormula extends CalcExpression
Constructor and Description |
---|
CalcFormula() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(java.lang.String name,
CalcExpression expression)
This method adds a parameter to the formula's parameter list.
|
java.lang.String |
getFormula()
Gets the formula.
|
java.util.HashMap<java.lang.String,CalcParameter> |
getParameters()
Gets the parameters.
|
double |
getValue()
Returns or calculates the value of the CalcExpression.
|
void |
setFormula(java.lang.String formula)
This method sets the formula.
|
void |
setParameters(java.util.HashMap<java.lang.String,CalcParameter> parameters)
Sets the parameters.
|
getUnit, setUnit, toString
public java.lang.String getFormula()
public void setFormula(java.lang.String formula)
formula
- the formula to setpublic void addParameter(java.lang.String name, CalcExpression expression)
name
- The parameter nameexpression
- The parameter valuepublic java.util.HashMap<java.lang.String,CalcParameter> getParameters()
public void setParameters(java.util.HashMap<java.lang.String,CalcParameter> parameters)
parameters
- the parameters to setpublic double getValue() throws CalcExeption
CalcExpression
getValue
in class CalcExpression
CalcExeption
- the CalcExeption