Here you can find the source of null2Double(Object s)
public static double null2Double(Object s)
//package com.java2s; //License from project: Apache License public class Main { public static double null2Double(Object s) { double v = 0.0D; if (s != null) try { v = Double.parseDouble(null2String(s)); } catch (Exception localException) { }// www. j av a 2 s .co m return v; } public static String null2String(Object s) { return s == null ? "" : s.toString().trim(); } }