Java BigDecimal strValueBigDecimal(Number number)

Here you can find the source of strValueBigDecimal(Number number)

Description

str Value Big Decimal

License

Apache License

Declaration

public static BigDecimal strValueBigDecimal(Number number) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    public static BigDecimal strValueBigDecimal(Number number) {
        if (number == null) {
            return zeroBigDecimal();
        }/*w w  w .  j a  v a 2  s  . co m*/
        return new BigDecimal(String.valueOf(number));
    }

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

Related

  1. stripAndOrRescale(BigDecimal value)
  2. stripTrailingZeros(BigDecimal bigDecimal)
  3. stripTrailingZeros(BigDecimal value)
  4. stripTrailingZeros(final BigDecimal decimal)
  5. strToBigDecimal(final String arg)
  6. tangent(BigDecimal x)
  7. tanto(BigDecimal r, BigDecimal n)
  8. textToBigDecimal(String amountAsText)
  9. transferDonateAmount2Point(BigDecimal donateAmount)