Here you can find the source of getBigDecimal(Object number)
private static BigDecimal getBigDecimal(Object number)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w ww.j av a2 s .c o m * Actuate Corporation - initial API and implementation *******************************************************************************/ import java.math.BigDecimal; public class Main { private static BigDecimal getBigDecimal(Object number) { BigDecimal num = null; if (number instanceof BigDecimal) { num = (BigDecimal) number; } else { num = new BigDecimal(number.toString()); } return num; } }