Here you can find the source of toBigDecimal(final String bigdecimal)
Parameter | Description |
---|---|
bigdecimal | the bigdecimal |
public static BigDecimal toBigDecimal(final String bigdecimal)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { /**// www . j a v a 2 s . c o m * To big decimal. * * @param bigdecimal the bigdecimal * @return the big decimal */ public static BigDecimal toBigDecimal(final String bigdecimal) { if (bigdecimal == null) { return null; } if (bigdecimal.length() < 1) { return null; } try { return new BigDecimal(bigdecimal); } catch (final Exception e) { return null; } } }