private boolean isNumericString(final String s){
  int i=0;
  if (s.length() == 0) {
    return false;
  }
  final char[] chars=s.toCharArray();
  boolean seenDot=false;
  if (chars[0] == '+' || chars[0] == '-') {
    i++;
  }
  while (i < s.length()) {
    if (chars[i] == '.') {
      if (seenDot) {
        return false;
      }
      seenDot=true;
    }
 else     if (chars[i] < '0' || chars[i] > '9') {
      return false;
    }
    i++;
  }
  return true;
}

private boolean isNumericString ( final String s ) { int i = 0 ; if ( s . length ( ) == 0 ) { return false ; } final char [ ] chars = s . toCharArray ( ) ; boolean seenDot = false ; if ( chars [ 0 ] == '+' || chars [ 0 ] == '-' ) { i ++ ; } while ( i < s . length ( ) ) { if ( chars [ i ] == '.' ) { if ( seenDot ) { return false ; } seenDot = true ; } else if ( chars [ i ] < '0' || chars [ i ] > '9' ) { return false ; } i ++ ; } return true ; }
check whether the string is a decimal numeric string .
