@Test public void getSuffixYinUnU_forMasculineWordEndingWithConsonant() { char wordLastChar = MongolCode.Uni.GA; String result = MongolCode.getSuffixYinUnU(MongolCode.Gender.MASCULINE, wordLastChar); String expected = MongolCode.Suffix.UN; assertEquals(expected, result); }
public static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar) { if (isVowel(previousWordLastChar)) { return Suffix.YIN; } else if (previousWordLastChar == Uni.NA) { if (previousWordGender == Gender.MASCULINE) { return Suffix.U; } else { return Suffix.UE; } } else { if (previousWordGender == Gender.MASCULINE) { return Suffix.UN; } else { return Suffix.UEN; } } }
MongolCode { public static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar) { if (isVowel(previousWordLastChar)) { return Suffix.YIN; } else if (previousWordLastChar == Uni.NA) { if (previousWordGender == Gender.MASCULINE) { return Suffix.U; } else { return Suffix.UE; } } else { if (previousWordGender == Gender.MASCULINE) { return Suffix.UN; } else { return Suffix.UEN; } } } }
MongolCode { public static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar) { if (isVowel(previousWordLastChar)) { return Suffix.YIN; } else if (previousWordLastChar == Uni.NA) { if (previousWordGender == Gender.MASCULINE) { return Suffix.U; } else { return Suffix.UE; } } else { if (previousWordGender == Gender.MASCULINE) { return Suffix.UN; } else { return Suffix.UEN; } } } private  MongolCode(); }
MongolCode { public static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar) { if (isVowel(previousWordLastChar)) { return Suffix.YIN; } else if (previousWordLastChar == Uni.NA) { if (previousWordGender == Gender.MASCULINE) { return Suffix.U; } else { return Suffix.UE; } } else { if (previousWordGender == Gender.MASCULINE) { return Suffix.UN; } else { return Suffix.UEN; } } } private  MongolCode(); String unicodeToMenksoft(CharSequence inputString); String menksoftToUnicode(String inputString); static Location getLocation(CharSequence textBefore, CharSequence textAfter); static boolean isMenksoft(char character); static boolean isVowel(char character); static boolean isMasculineVowel(char character); static boolean isFeminineVowel(char character); static boolean isConsonant(char character); static boolean isFVS(char character); static boolean isMongolian(char character); static boolean isMvsPrecedingChar(char character); static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar); static String getSuffixTuDu(Gender previousWordGender, char previousWordLastChar); static String getSuffixTaganDagan(Gender previousWordGender, char previousWordLastChar); static String getSuffixTaqiDaqi(Gender previousWordGender, char previousWordLastChar); static String getSuffixYiI(char previousWordLastChar); static String getSuffixBarIyar(Gender previousWordGender, char previousWordLastChar); static String getSuffixBanIyan(Gender previousWordGender, char previousWordLastChar); static String getSuffixAchaEche(Gender previousWordGender); static String getSuffixTaiTei(Gender previousWordGender); static String getSuffixUu(Gender previousWordGender); static String getSuffixUd(Gender previousWordGender); static String getSuffixNugud(Gender previousWordGender); static String getSuffixChu(Gender previousWordGender); static Gender getWordGender(String word); }
MongolCode { public static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar) { if (isVowel(previousWordLastChar)) { return Suffix.YIN; } else if (previousWordLastChar == Uni.NA) { if (previousWordGender == Gender.MASCULINE) { return Suffix.U; } else { return Suffix.UE; } } else { if (previousWordGender == Gender.MASCULINE) { return Suffix.UN; } else { return Suffix.UEN; } } } private  MongolCode(); String unicodeToMenksoft(CharSequence inputString); String menksoftToUnicode(String inputString); static Location getLocation(CharSequence textBefore, CharSequence textAfter); static boolean isMenksoft(char character); static boolean isVowel(char character); static boolean isMasculineVowel(char character); static boolean isFeminineVowel(char character); static boolean isConsonant(char character); static boolean isFVS(char character); static boolean isMongolian(char character); static boolean isMvsPrecedingChar(char character); static String getSuffixYinUnU(Gender previousWordGender, char previousWordLastChar); static String getSuffixTuDu(Gender previousWordGender, char previousWordLastChar); static String getSuffixTaganDagan(Gender previousWordGender, char previousWordLastChar); static String getSuffixTaqiDaqi(Gender previousWordGender, char previousWordLastChar); static String getSuffixYiI(char previousWordLastChar); static String getSuffixBarIyar(Gender previousWordGender, char previousWordLastChar); static String getSuffixBanIyan(Gender previousWordGender, char previousWordLastChar); static String getSuffixAchaEche(Gender previousWordGender); static String getSuffixTaiTei(Gender previousWordGender); static String getSuffixUu(Gender previousWordGender); static String getSuffixUd(Gender previousWordGender); static String getSuffixNugud(Gender previousWordGender); static String getSuffixChu(Gender previousWordGender); static Gender getWordGender(String word); final static MongolCode INSTANCE; }