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 { /** EMPTY [String] */ public static final String EMPTY = ""; public static Double toDouble(Object value) { try {/* w w w . j a va 2s . c o m*/ if (value == null || EMPTY.equals(value)) { return null; } return Double.valueOf(value.toString()); } catch (Exception e) { e.printStackTrace(); return null; } } }