Here you can find the source of toDouble(Object obj)
Parameter | Description |
---|---|
obj | Object to be convert. |
public static double toDouble(Object obj)
//package com.java2s; /*L//from ww w .j av a 2 s . c om * Copyright Washington University in St. Louis, SemanticBits, Persistent Systems, Krishagni. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/commons-module/LICENSE.txt for details. */ public class Main { /** * This method convert object to Double. * @param obj Object to be convert. * @return Double value. */ public static double toDouble(Object obj) { double value = 0; if (obj != null) { value = ((Double) obj).doubleValue(); } return value; } }