Code example for BigDecimal

Methods: add

0
public abstract class ELArithmetic { 
 
    public final static class BigDecimalDelegate extends ELArithmetic { 
 
        protected Number add(Number num0, Number num1) {
            return ((BigDecimal) num0).add((BigDecimal) num1);
        } 
 
        protected Number coerce(Number num) {
            if (num instanceof BigDecimal)
                return num;
            if (num instanceof BigInteger)
                return new BigDecimal((BigInteger) num);
            return new BigDecimal(num.doubleValue());
        } 
 
        protected Number coerce(String str) {
            return new BigDecimal(str);
        } 
 
        protected Number divide(Number num0, Number num1) {