Here you can find the source of null2Double(Object s, double defValue)
public static double null2Double(Object s, double defValue)
//package com.java2s; //License from project: Apache License public class Main { public static double null2Double(Object s, double defValue) { if (s != null) { try { return Double.parseDouble(s.toString()); } catch (Exception e) { }/*from www . j ava 2 s .c o m*/ } return defValue; } }