Here you can find the source of toDouble(Object object)
public static Double toDouble(Object object)
//package com.java2s; //License from project: Apache License public class Main { public static Double toDouble(Object object) { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble(object.toString()); }//from w ww. j ava 2 s .c o m public static String toString(Object object) { return object == null ? null : object.toString(); } }