Here you can find the source of getBigDecimal(Object o)
public static BigDecimal getBigDecimal(Object o)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static BigDecimal getBigDecimal(Object o) { if (o instanceof Number) { return new BigDecimal(((Number) o).doubleValue()); }//from www . j a va 2 s. c o m return new BigDecimal(o.toString()); } }