Here you can find the source of parseToBigDecimal(Object value)
public static BigDecimal parseToBigDecimal(Object value)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.math.BigDecimal; public class Main { public static BigDecimal parseToBigDecimal(Object value) { if (value == null) { return null; }/*from w w w . ja va 2 s . c o m*/ if (value instanceof Byte) { return new BigDecimal((Byte) value); } else if (value instanceof Double) { return new BigDecimal((Double) value); } else if (value instanceof Float) { return new BigDecimal((Float) value); } else if (value instanceof Integer) { return new BigDecimal((Integer) value); } else if (value instanceof Long) { return new BigDecimal((Long) value); } else if (value instanceof Short) { return new BigDecimal((Short) value); } else { return new BigDecimal(value.toString()); } } }