private static String firstCharOnlyToUpper(String word) { return (word.isEmpty()) ? word : new StringBuilder(word.length()) .append(Ascii.toUpperCase(word.charAt(0))) .append(Ascii.toLowerCase(word.substring(1))) .toString(); }
@Override String convert(CaseFormat format, String s) { if (format == LOWER_HYPHEN) { return s.replace('_', '-'); } if (format == UPPER_UNDERSCORE) { return Ascii.toUpperCase(s); } return super.convert(format, s); }
@Override String normalizeWord(String word) { return Ascii.toUpperCase(word); }