Here you can find the source of toDouble(String value, Double fallback)
public static Double toDouble(String value, Double fallback)
//package com.java2s; //License from project: Open Source License public class Main { public static Double toDouble(String value, Double fallback) { if (value == null || value.isEmpty()) { return fallback; }/*from w w w .j ava2s . c o m*/ try { return Double.valueOf(value); } catch (Exception e) { return fallback; } } }