Here you can find the source of getNumberAsBigDecimal(Number value)
public static BigDecimal getNumberAsBigDecimal(Number value)
//package com.java2s; import java.math.BigDecimal; public class Main { public static BigDecimal getNumberAsBigDecimal(Number value) { if (value == null) return null; return new BigDecimal(String.valueOf(value)); }/*ww w .j a va 2s .c o m*/ }