Code example for BigInteger

Methods: add

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