Here you can find the source of add(final BigDecimal v1, final BigDecimal v2)
Parameter | Description |
---|---|
v1 | null is supported. |
v2 | null is supported. |
public static BigDecimal add(final BigDecimal v1, final BigDecimal v2)
//package com.java2s; // ProjectForge is dual-licensed. import java.math.BigDecimal; public class Main { /**//from www .j a va 2 s. c om * @param v1 null is supported. * @param v2 null is supported. * @return */ public static BigDecimal add(final BigDecimal v1, final BigDecimal v2) { if (v1 == null) { if (v2 == null) { return BigDecimal.ZERO; } else { return v2; } } else { if (v2 == null) { return v1; } else { return v1.add(v2); } } } }