public double getNumericValue ( ) { String original = getText ( ) . toString ( ) . replaceAll ( mNumberFilterRegex , "" ) ; if ( hasCustomDecimalSeparator ) { // swap custom decimal separator with locale one to allow parsing original = StringUtils . replace ( original , String . valueOf ( mDecimalSeparator ) , String . valueOf ( DECIMAL_SEPARATOR ) ) ; } try { return NumberFormat . getInstance ( ) . parse ( original ) . doubleValue ( ) ; } catch ( ParseException e ) { return Double . NaN ; } }
Return numeric value represented by the text field