KanjidicEntry extends DictEntry { public List<String> getEnglish() { final List<String> result = new ArrayList<String>(); for (final String e : english.split(",")) { final String ee = e.trim(); if (ee.length() == 0) { continue; } result.add(ee); } return result; } KanjidicEntry(final String kanji, final String reading, final String english, final int radical, final int strokes, final String skip, final Integer grade); Integer getJlpt(); char getKanji(); List<String> getOnyomi(); List<String> getKunyomi(); List<String> getNamae(); List<String> getEnglish(); static String removeSplits(final String str); final int radical; final int strokes; final String skip; final Integer grade; }
@Test public void testEnglish() { assertArrayEquals(test1().getEnglish(), Arrays.asList("love", "affection", "favourite")); assertArrayEquals(test2().getEnglish(), Arrays.asList("direction", "person", "alternative")); assertArrayEquals(test3().getEnglish(), Arrays.asList("a to b", "foo bar baz")); }