public class BigDecAdd extends Add
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
BigDecAdd(java.math.MathContext mc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
add(java.lang.Object l,
java.lang.Object r)
Adds two numbers together.
|
boolean |
getAllowStrings()
Whether adding strings is allowed.
|
java.math.MathContext |
getMathContext() |
void |
setAllowStrings(boolean allowStrings)
Sets whether strings should be allowed with this operator or not.
|
void |
setMathContext(java.math.MathContext mc) |
checkNumberOfParameters, eval, run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public BigDecAdd(java.math.MathContext mc)
mc
- public void setMathContext(java.math.MathContext mc)
public java.math.MathContext getMathContext()
public java.lang.Object add(java.lang.Object l, java.lang.Object r) throws EvaluationException
Add
add
in class Add
l
- The first parameter to be added.r
- The second parameter to be added.EvaluationException
- if the calculation cannot be performedpublic boolean getAllowStrings()
public void setAllowStrings(boolean allowStrings)
allowStrings
- When true, strings are allowed. When false
an IllegalParameterException is thrown during evaluation.Copyright © 2018 Singular Systems http://www.singularsys.com/jep