Here you can find the source of convertToBigDecimal(Object sourceValue)
public static BigDecimal convertToBigDecimal(Object sourceValue)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal convertToBigDecimal(Object sourceValue) { if (sourceValue instanceof Number) { return new BigDecimal(((Number) sourceValue).toString()); } else if (sourceValue instanceof String) { return new BigDecimal((String) sourceValue); }/*from w ww .ja v a2s . c om*/ return null; } }