package com.zq.utils;
/**
*
* 经度数字操作类
*
* Created by MyEclipse. Author: ChenBin E-mail: chenbin_2008@126.com Date:
* 2016-8-17 Time: 下午1:14:42
*/
public class BigDecimalUtils {
/**
*
* Description Integer,String 转 Double
* @author wangzhiyuan
* @date 2017-11-2 上午10:11:55
* @param o
* @return double
*/
public static double toDouble(Object o){
if(o == null){
return 0.0;
}else if(o instanceof Integer){
return Double.valueOf(o.toString());
}else if(o instanceof String){
return Double.parseDouble(o.toString());
}else if(o instanceof Double){
return Double.valueOf((Double)o);
}else{
return 0.0;
}
}
}