KanjiUtils { public static String halfwidthToKatakana(final String halfwidth) { return translate(halfwidth, HALFWIDTH_TO_KATAKANA, 2); } private  KanjiUtils(); static boolean isHiragana(char c); static boolean isKatakana(char c); static String halfwidthToKatakana(final String halfwidth); static String toHalfwidth(final String katakana); static boolean isHalfwidth(final char ch); static boolean isKana(char ch); static boolean isKanji(char ch); static boolean isJapaneseChar(final char ch); static int getCommonality(final char ch); static int getCommonality(final String str); static Integer getJlptLevel(final Character kanji); static String getJlptKanjis(final int level); static final Map<KanjiQuiz, String> QUIZ_TABLE; }
@Test public void testToFullwidthKatakana() { assertEquals("パパ", KanjiUtils.halfwidthToKatakana("ﾊﾟﾊﾟ")); assertEquals("コンピューター", KanjiUtils.halfwidthToKatakana("ｺﾝﾋﾟｭｰﾀｰ")); assertEquals("JOZOパパFOO", KanjiUtils.halfwidthToKatakana("JOZOﾊﾟﾊﾟFOO")); assertEquals("FOOBARBAZ", KanjiUtils.halfwidthToKatakana("FOOBARBAZ")); }