Here you can find the source of toDouble(Object value)
public static Double toDouble(Object value)
//package com.java2s; //License from project: Apache License public class Main { public static Double toDouble(Object value) { if (value == null) { return new Double(0); } else {//from w w w. j av a2 s . c o m return new Double(value.toString()); } } public static String toString(Object value) { if (value == null) { return ""; } else { return value.toString(); } } }