public static boolean isFPZero(@NotNull final String text){
  for (int i=0; i < text.length(); i++) {
    final char c=text.charAt(i);
    if (Character.isDigit(c) && c != '0')     return false;
    final char d=Character.toUpperCase(c);
    if (d == 'E' || d == 'P')     break;
  }
  return true;
}

public static boolean isFPZero ( @ NotNull final String text ) { for ( int i = 0 ; i < text . length ( ) ; i ++ ) { final char c = text . charAt ( i ) ; if ( Character . isDigit ( c ) && c != '0' ) return false ; final char d = Character . toUpperCase ( c ) ; if ( d == 'E' || d == 'P' ) break ; } return true ; }
see jls 3 . 10 . 2 . floating - point literals
