Here you can find the source of asDouble(String str)
private static double asDouble(String str)
//package com.java2s; //License from project: LGPL public class Main { private static double asDouble(String str) { try {//from w w w.j a v a 2 s . c o m return Double.valueOf(str); } catch (NumberFormatException nfex) { return Double.NaN; } } }