Java BigDecimal Parse parseTo_BigDecimal(String s)

Here you can find the source of parseTo_BigDecimal(String s)

Description

parse T Big Decimal

License

Open Source License

Declaration

public static BigDecimal parseTo_BigDecimal(String s) 

Method Source Code

//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.math.BigDecimal;

public class Main {
    public static BigDecimal parseTo_BigDecimal(String s) {
        if (s == null) {
            return null;
        }/*ww  w. j  a v a 2  s .co m*/
        try {
            return new BigDecimal(s);

        } catch (NumberFormatException nfe) {

            if (nfe.getMessage() == null) {

                throw new NumberFormatException("Incorrect input \"" + s + "\" for BigDecimal.");

            } else {

                throw nfe;
            }
        }
    }
}

Related

  1. parseBigDecimal(Object value)
  2. parseBigDecimal(String data)
  3. parseBigDecimal(String inString, BigDecimal inDefault)
  4. parseBigDecimal(String number, BigDecimal defValue)
  5. parseBigDecimalForEntity(String bigDecimalString)
  6. parseTo_BigDecimal(String s)
  7. parseToBigDecimal(Object value)
  8. string2BigDecimal(String valor)
  9. stringToBigDecimal(String numeroStr)