Java BigDecimal Value Check isParseableBigDecimal(String string)

Here you can find the source of isParseableBigDecimal(String string)

Description

is Parseable Big Decimal

License

Open Source License

Declaration

public static boolean isParseableBigDecimal(String string) 

Method Source Code

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

import java.math.BigDecimal;

public class Main {
    public static boolean isParseableBigDecimal(String string) {

        return parseBigDecimal(string) != null;
    }/*www  .  j  a v  a 2s . c om*/

    public static BigDecimal parseBigDecimal(String inString) {

        return parseBigDecimal(inString, null);
    }

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

        try {

            return new BigDecimal(inString);

        } catch (final Exception e) {

            return inDefault;
        }
    }
}

Related

  1. isNotZeroPositive(BigDecimal value)
  2. isNull(BigDecimal bdg)
  3. isNull(final BigDecimal s)
  4. isNullOrZero(BigDecimal number)
  5. isNullOrZero(BigDecimal value)
  6. isPositive(BigDecimal number)
  7. isPositive(BigDecimal value)
  8. isPrimeNumber(BigDecimal inBd)
  9. isProfitable(BigDecimal ask, BigDecimal bid, BigDecimal fee, BigDecimal minProfit)