Java BigDecimal Parse parseBigDecimal(String number, BigDecimal defValue)

Here you can find the source of parseBigDecimal(String number, BigDecimal defValue)

Description

parse Big Decimal

License

Apache License

Declaration

public static BigDecimal parseBigDecimal(String number, BigDecimal defValue) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {

    public static BigDecimal parseBigDecimal(String number, BigDecimal defValue) {
        try {//from  w  ww .jav  a2s . c  om
            if (number != null && !number.isEmpty())
                return new BigDecimal(number);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return defValue;
    }
}

Related

  1. parseBigDecimal(Object obj)
  2. parseBigDecimal(Object value)
  3. parseBigDecimal(Object value)
  4. parseBigDecimal(String data)
  5. parseBigDecimal(String inString, BigDecimal inDefault)
  6. parseBigDecimalForEntity(String bigDecimalString)
  7. parseTo_BigDecimal(String s)
  8. parseTo_BigDecimal(String s)
  9. parseToBigDecimal(Object value)