Java BigDecimal Create getBigDecimal(String aInput)

Here you can find the source of getBigDecimal(String aInput)

Description

get Big Decimal

License

Open Source License

Declaration

public static BigDecimal getBigDecimal(String aInput) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {
    public static final BigDecimal BLANK_DECIMAL = new BigDecimal(-99999);

    public static BigDecimal getBigDecimal(String aInput) {
        return getBigDecimal(aInput, BLANK_DECIMAL);
    }//from w w w  .  j  a  va 2  s  .com

    public static BigDecimal getBigDecimal(String aInput, BigDecimal aDefaultValue) {
        try {
            return new BigDecimal(aInput);
        } catch (Exception e) {
            return aDefaultValue;
        }
    }
}

Related

  1. getBigDecimal(Object o)
  2. getBigDecimal(Object o)
  3. getBigDecimal(Object v, BigDecimal defaultValue)
  4. getBigDecimal(Object value)
  5. getBigDecimal(Object value)
  6. getBigDecimal(String value)
  7. getBigDecimalArrayFromByteArray(byte[] buf)
  8. getBigDecimalByObject(Object obj)
  9. getBigDecimalFrom(double value)