Here you can find the source of formatDouble(String value)
Parameter | Description |
---|---|
value | The value validation is being performed on. |
public static Double formatDouble(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w. ja v a 2 s . c o m*/ * Checks if the value can safely be converted to a double primitive. * * @param value The value validation is being performed on. * @return format result */ public static Double formatDouble(String value) { if (value == null) { return null; } try { return new Double(value); } catch (NumberFormatException e) { return null; } } }