Here you can find the source of toDoubleValue(Object value)
public static Double toDoubleValue(Object value)
//package com.java2s; // The MIT License (MIT) public class Main { public static Double toDoubleValue(Object value) { if ((value == null) || (value.getClass() == Double.class)) { return (Double) value; }//from ww w . j ava 2 s . co m if (value instanceof Number) { return ((Number) value).doubleValue(); } throw new IllegalArgumentException( "value must be instance of Number."); } }