Here you can find the source of isDoubleWhitFormat(String pValue)
public static boolean isDoubleWhitFormat(String pValue)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean isDoubleWhitFormat(String pValue) { try {//www . j a va 2 s . c om if (!pValue.equals("")) { java.text.DecimalFormat formatDecimal = new java.text.DecimalFormat( "###,##0.00"); java.text.DecimalFormatSymbols symbols = new java.text.DecimalFormatSymbols(); symbols.setGroupingSeparator(','); symbols.setDecimalSeparator('.'); formatDecimal.setDecimalFormatSymbols(symbols); double valor = formatDecimal.parse(pValue).doubleValue(); // double valor = Double.parseDouble(pValue); return true; } else return false; } catch (Exception e) { return false; } } }