Java BigDecimal Add add2Abs(BigDecimal aValue1, BigDecimal aValue2)

Here you can find the source of add2Abs(BigDecimal aValue1, BigDecimal aValue2)

Description

add Abs

License

Open Source License

Declaration

public static BigDecimal add2Abs(BigDecimal aValue1, BigDecimal aValue2) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {

    public static BigDecimal add2Abs(BigDecimal aValue1, BigDecimal aValue2) {
        if (aValue1 == null || aValue2 == null)
            return null;

        return aValue1.add(aValue2).abs();
    }//from   w w w  . j  a v a 2s .co  m

    public static BigDecimal add(BigDecimal aValue1, BigDecimal aValue2) {
        if (aValue1 == null || aValue2 == null)
            return null;

        return aValue1.add(aValue2);
    }
}

Related

  1. add(BigDecimal[] item1, BigDecimal[] item2)
  2. add(final BigDecimal baseAmount, final BigDecimal amountToAdd)
  3. add(final BigDecimal start, final BigDecimal... values)
  4. add(final BigDecimal v1, final BigDecimal v2)
  5. add(Vector a, Vector b)
  6. addBigDec(BigDecimal b1, BigDecimal b2)
  7. addBigDecimal(BigDecimal a, BigDecimal b)
  8. addBigDecimals(String value1, String value2)
  9. addBigDecimalsInMap(Map baseMap, Map addMap)