Java BigDecimal Str2BigDecimal(String a)

Here you can find the source of Str2BigDecimal(String a)

Description

Str Big Decimal

License

Open Source License

Declaration

public static BigDecimal Str2BigDecimal(String a) 

Method Source Code


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

public class Main {

    public static BigDecimal Str2BigDecimal(String a) {
        try {/*from ww w . jav a 2 s.  co m*/
            return (new BigDecimal(a));
        } catch (Exception e) {
            return BigDecimal.valueOf(0);
        }
    }
}

Related

  1. sortByValues( Map map)
  2. sortMapByBDValue(Map oriMap)
  3. stdBigDecimal(List vector, BigDecimal avg)
  4. stddev(List numbers, boolean biasCorrected, MathContext context)
  5. stdDevMaxFromMapField(List> dataList, String fieldName, BigDecimal stdDevMultiplier)
  6. str2BigDicimal(String strbigdecimal)
  7. stripAndOrRescale(BigDecimal value)
  8. stripTrailingZeros(BigDecimal bigDecimal)
  9. stripTrailingZeros(BigDecimal value)