public abstract class AbstractMathFunction extends AbstractFunction
BigDecimal and
ensures that only valid FunctionValues are accepted.values| Constructor and Description |
|---|
AbstractMathFunction() |
AbstractMathFunction(List<FunctionValue> values) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFunctionValue(FunctionValue value)
Add the given
FunctionValue for calculation. |
protected BigDecimal |
convertValue(Object value)
Converts a given value to a
BigDecimal. |
protected void |
validateMethodParameter(List<FunctionValue> values)
Performs a type check for the given list of
FunctionValues and
throws a FunctionException in case a StringFunctionValue
is contained. |
isEmptyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetValuepublic AbstractMathFunction()
public AbstractMathFunction(List<FunctionValue> values)
public void addFunctionValue(FunctionValue value)
OperatorFunctionValueFunctionValue for calculation.addFunctionValue in interface OperatorFunctionValueaddFunctionValue in class AbstractFunctionvalue - The value to add.protected BigDecimal convertValue(Object value)
BigDecimal.value - The object to convert.BigDecimal representation of the given object.NumberFormatException - is the given value can not be converted to a
BigDecimalprotected void validateMethodParameter(List<FunctionValue> values)
FunctionValues and
throws a FunctionException in case a StringFunctionValue
is contained.values - The list of FunctionValue that should be checked.FunctionException - if a StringFunctionValue is detected.Copyright © 2019. All rights reserved.