@Test public void asLanguageName() { assertEquals("simple", StringUtils.asLanguageName("simple")); assertEquals("header", StringUtils.asLanguageName("header")); assertEquals("tokenize", StringUtils.asLanguageName("tokenize")); assertEquals("tokenize", StringUtils.asLanguageName("tokenizeXml")); assertEquals("javaScript", StringUtils.asLanguageName("js")); assertEquals("javaScript", StringUtils.asLanguageName("javascript")); assertNull(StringUtils.asLanguageName(null)); }
@Nullable public static String asLanguageName(String val) { if (val == null) { return null; } if (val.startsWith("tokenize")) { return "tokenize"; } else if (val.equals("js") || val.equals("javascript")) { return "javaScript"; } return val; }
StringUtils { @Nullable public static String asLanguageName(String val) { if (val == null) { return null; } if (val.startsWith("tokenize")) { return "tokenize"; } else if (val.equals("js") || val.equals("javascript")) { return "javaScript"; } return val; } }
StringUtils { @Nullable public static String asLanguageName(String val) { if (val == null) { return null; } if (val.startsWith("tokenize")) { return "tokenize"; } else if (val.equals("js") || val.equals("javascript")) { return "javaScript"; } return val; } private  StringUtils(); }
StringUtils { @Nullable public static String asLanguageName(String val) { if (val == null) { return null; } if (val.startsWith("tokenize")) { return "tokenize"; } else if (val.equals("js") || val.equals("javascript")) { return "javaScript"; } return val; } private  StringUtils(); @Nullable static String asComponentName(String val); @Nullable static String asLanguageName(String val); @NotNull static String getSafeValue(String key, List<Map<String, String>> rows); @NotNull static String getSafeValue(String key, Map<String, String> rows); @NotNull static String wrapSeparator(String line, String separator, String newLine, int watermark); @Nullable static String wrapWords(String line, String newLine, int watermark, boolean wrapLongWords); static boolean isEmpty(String str); static boolean isNotEmpty(String str); static String stripDoubleQuotes(String text); }
StringUtils { @Nullable public static String asLanguageName(String val) { if (val == null) { return null; } if (val.startsWith("tokenize")) { return "tokenize"; } else if (val.equals("js") || val.equals("javascript")) { return "javaScript"; } return val; } private  StringUtils(); @Nullable static String asComponentName(String val); @Nullable static String asLanguageName(String val); @NotNull static String getSafeValue(String key, List<Map<String, String>> rows); @NotNull static String getSafeValue(String key, Map<String, String> rows); @NotNull static String wrapSeparator(String line, String separator, String newLine, int watermark); @Nullable static String wrapWords(String line, String newLine, int watermark, boolean wrapLongWords); static boolean isEmpty(String str); static boolean isNotEmpty(String str); static String stripDoubleQuotes(String text);  }