Java BigDecimal Multiply mul(BigDecimal v1, BigDecimal v2)

Here you can find the source of mul(BigDecimal v1, BigDecimal v2)

Description

mul

License

Open Source License

Declaration

public static BigDecimal mul(BigDecimal v1, BigDecimal v2) 

Method Source Code


//package com.java2s;
/*//w w  w. ja v  a 2s  .c  o m
* Copyright 2016 Yonyou Corporation Ltd. All Rights Reserved.
*
* This software is published under the terms of the Yonyou Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project Name : cmol.common.function
*
* @File name : NumberUtil.java
*
* @Author : zhangxc
*
* @Date : 2016?3?29?
*
----------------------------------------------------------------------------------
*     Date       Who       Version     Comments
* 1. 2016?3?29?    zhangxc    1.0
*
*
*
*
----------------------------------------------------------------------------------
*/

import java.math.BigDecimal;

public class Main {

    public static BigDecimal mul(BigDecimal v1, BigDecimal v2) {
        v1 = v1 == null ? BigDecimal.ZERO : v1;
        v2 = v2 == null ? BigDecimal.ZERO : v2;
        return v1.multiply(v2);
    }
}

Related

  1. mul(BigDecimal b1, BigDecimal b2)
  2. mul(BigDecimal d1, BigDecimal d2)
  3. mul(BigDecimal v1, BigDecimal v2)
  4. multiple(BigDecimal dividend, int divisor)
  5. multiply(BigDecimal a, BigDecimal b)
  6. multiply(BigDecimal a, int multiplier)
  7. multiply(BigDecimal amount, BigDecimal multiplicand, int scale)