Java BigDecimal Multiply multiply(BigDecimal bigDecimal, BigDecimal bigDecimal2)

Here you can find the source of multiply(BigDecimal bigDecimal, BigDecimal bigDecimal2)

Description

multiply

License

Apache License

Declaration

public static BigDecimal multiply(BigDecimal bigDecimal, BigDecimal bigDecimal2) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {

    public static BigDecimal multiply(BigDecimal bigDecimal, BigDecimal bigDecimal2) {
        if (bigDecimal == null && bigDecimal2 == null) {
            return zeroBigDecimal();
        }/*from   w w w . ja v a  2 s  . c  o m*/
        if (bigDecimal == null) {
            return bigDecimal2;
        }
        if (bigDecimal2 == null) {
            return bigDecimal;
        }
        return bigDecimal.multiply(bigDecimal2);
    }

    public static BigDecimal zeroBigDecimal() {
        return new BigDecimal("0.00");
    }
}

Related

  1. multiple(BigDecimal dividend, int divisor)
  2. multiply(BigDecimal a, BigDecimal b)
  3. multiply(BigDecimal a, int multiplier)
  4. multiply(BigDecimal amount, BigDecimal multiplicand, int scale)
  5. multiply(BigDecimal aValue1, BigDecimal aValue2)
  6. multiply(BigDecimal left, BigDecimal right)
  7. multiply(BigDecimal multiplier1, BigDecimal multiplier2, int scale)
  8. multiply(BigDecimal num1, BigDecimal num2)
  9. multiply(BigDecimal num1, BigDecimal num2)