Here you can find the source of getBigDecimal(Object o)
Parameter | Description |
---|---|
o | a parameter |
public static BigDecimal getBigDecimal(Object o)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { /**/*from w w w. ja va 2 s .c om*/ * * @param o * @return */ public static BigDecimal getBigDecimal(Object o) { BigDecimal sh = new BigDecimal(0); if (null == o) return sh; if (o instanceof Number) { Number num = (Number) o; sh = new BigDecimal(num.doubleValue()); } return sh; } }