Java BigDecimal Parse parseBigDecimal(String inString, BigDecimal inDefault)

Here you can find the source of parseBigDecimal(String inString, BigDecimal inDefault)

Description

parse Big Decimal

License

Open Source License

Declaration

public static BigDecimal parseBigDecimal(String inString, BigDecimal inDefault) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal parseBigDecimal(String inString) {

        return parseBigDecimal(inString, null);
    }/*w w w. j a  va2s .  co m*/

    public static BigDecimal parseBigDecimal(String inString, BigDecimal inDefault) {

        try {

            return new BigDecimal(inString);

        } catch (final Exception e) {

            return inDefault;
        }
    }
}

Related

  1. parseBigDecimal(Object o, BigDecimal defaulti)
  2. parseBigDecimal(Object obj)
  3. parseBigDecimal(Object value)
  4. parseBigDecimal(Object value)
  5. parseBigDecimal(String data)
  6. parseBigDecimal(String number, BigDecimal defValue)
  7. parseBigDecimalForEntity(String bigDecimalString)
  8. parseTo_BigDecimal(String s)
  9. parseTo_BigDecimal(String s)