Java BigDecimal getNumberAsBigDecimal(Number value)

Here you can find the source of getNumberAsBigDecimal(Number value)

Description

get Number As Big Decimal

License

Open Source License

Declaration

public static BigDecimal getNumberAsBigDecimal(Number value) 

Method Source Code

//package com.java2s;

import java.math.BigDecimal;

public class Main {
    public static BigDecimal getNumberAsBigDecimal(Number value) {
        if (value == null)
            return null;

        return new BigDecimal(String.valueOf(value));
    }/*ww  w  .j a va  2s .c  o  m*/
}

Related

  1. getMaxBigDecimal(int precision, int scale)
  2. getMaxPrecision(BigDecimal... decimals)
  3. getMean(final BigDecimal... vals)
  4. getMicroSec(BigDecimal hours)
  5. getMinBigDecimal(@Nonnull final BigDecimal aValue, @Nonnull final BigDecimal... aValues)
  6. getNumberOfDecimalPlaces(BigDecimal bigDecimal)
  7. getParamBigDecimal(Map paramMap, String paramName)
  8. getPercent(BigDecimal numerator, BigDecimal denominator)
  9. getPercentage(BigDecimal amount, BigDecimal percent)