Java BigDecimal to convertBigDecimalTodouble(BigDecimal bigDecimalVal)

Here you can find the source of convertBigDecimalTodouble(BigDecimal bigDecimalVal)

Description

Convert big decimal todouble.

License

Open Source License

Parameter

Parameter Description
bigDecimalVal the big decimal val

Return

the double

Declaration

public static double convertBigDecimalTodouble(BigDecimal bigDecimalVal) 

Method Source Code


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

public class Main {
    /**//from w  ww . ja  v  a 2s .  co m
     * Convert big decimal todouble.
     *
     * @param bigDecimalVal the big decimal val
     * @return the double
     */
    public static double convertBigDecimalTodouble(BigDecimal bigDecimalVal) {
        if (bigDecimalVal != null) {
            return bigDecimalVal.doubleValue();
        }
        return 0;
    }
}

Related

  1. bigDecimalToLong(BigDecimal bigDecimal)
  2. bigDecimalToLong(BigDecimal value)
  3. bigDecimalToStellarBalance(final BigDecimal balance)
  4. bigDecimalToString(BigDecimal bigDecimal)
  5. bigDecimalToString(BigDecimal dec)
  6. convertBigDecimalToSQLBigNum(BigDecimal bd, int targetLength, int targetScale)
  7. convertBigDecimalToString(BigDecimal bigValue)
  8. convertDoubleToBigDecimal(Double value)
  9. convertDoubleToBigDecimal(final Double score, final int decimalPlaces)