public static String createQuotedConstant ( String str ) { if ( str == null || str . isEmpty ( ) ) { return str ; } try { Double . parseDouble ( str ) ; } catch ( NumberFormatException nfe ) { return "\"" + str + "\"" ; } return str ; }
Puts strings inside quotes and numerics are left as they are .