Here you can find the source of toBigDecimal(final String string)
public static BigDecimal toBigDecimal(final String string)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static BigDecimal toBigDecimal(final String string) { if (string == null || string.isEmpty()) { return BigDecimal.ZERO; }/*from www. j a v a2 s .co m*/ return new BigDecimal(string); } public static boolean isEmpty(final String string) { return string == null || string.trim().length() == 0; } }