Here you can find the source of addDoubles(Double value, Double addValue)
public static Double addDoubles(Double value, Double addValue)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static Double addDoubles(Double value, Double addValue) { BigDecimal sum = BigDecimal.ZERO; // new BigDecimal(0) if (value != null) { sum = BigDecimal.valueOf(value); }// www . j ava2 s . c o m if (addValue != null) { sum = sum.add(BigDecimal.valueOf(addValue)); } return sum.doubleValue(); } }