KanjiUtils { public static boolean isKanji(char ch) { return (ch >= 19968) && (ch <= 40864); } 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 testKanji() { assertTrue(KanjiUtils.isKanji('艦')); assertFalse(KanjiUtils.isKanji('か')); assertFalse(KanjiUtils.isKanji('キ')); assertFalse(KanjiUtils.isKanji('ー')); assertFalse(KanjiUtils.isKanji('っ')); assertFalse(KanjiUtils.isKanji('ゃ')); assertFalse(KanjiUtils.isKanji('ゅ')); assertFalse(KanjiUtils.isKanji('ょ')); assertFalse(KanjiUtils.isKanji('ャ')); assertFalse(KanjiUtils.isKanji('ュ')); assertFalse(KanjiUtils.isKanji('ョ')); }