@Test public void shouldCreateInsertOptionalLetterRules() { { final SuffixFormSequence sequence = new SuffixFormSequence("+y"); assertThat(sequence.getRules(), hasSize(1)); assertThat(sequence.getRules().get(0).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_OPTIONAL_CONSONANT)); assertThat(sequence.getRules().get(0).getCharToAdd().getCharValue(), equalTo('y')); } { final SuffixFormSequence sequence = new SuffixFormSequence("+a"); assertThat(sequence.getRules(), hasSize(1)); assertThat(sequence.getRules().get(0).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_OPTIONAL_VOWEL)); assertThat(sequence.getRules().get(0).getCharToAdd().getCharValue(), equalTo('a')); } { final SuffixFormSequence sequence = new SuffixFormSequence("+A"); assertThat(sequence.getRules(), hasSize(1)); assertThat(sequence.getRules().get(0).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_OPTIONAL_VOWEL_A_WITH_HARMONY)); assertThat(sequence.getRules().get(0).getCharToAdd(), nullValue()); } { final SuffixFormSequence sequence = new SuffixFormSequence("+Im"); assertThat(sequence.getRules(), hasSize(2)); assertThat(sequence.getRules().get(0).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_OPTIONAL_VOWEL_I_WITH_HARMONY)); assertThat(sequence.getRules().get(0).getCharToAdd(), nullValue()); assertThat(sequence.getRules().get(1).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_NONVOWEL_LETTER)); assertThat(sequence.getRules().get(1).getCharToAdd().getCharValue(), equalTo('m')); } { final SuffixFormSequence sequence = new SuffixFormSequence("+uA"); assertThat(sequence.getRules(), hasSize(2)); assertThat(sequence.getRules().get(0).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_OPTIONAL_VOWEL)); assertThat(sequence.getRules().get(0).getCharToAdd().getCharValue(), equalTo('u')); assertThat(sequence.getRules().get(1).getRuleType(), equalTo(SuffixFormSequence.SuffixFormSequenceRuleType.INSERT_VOWEL_A_WITH_HARMONY)); assertThat(sequence.getRules().get(1).getCharToAdd(), nullValue()); } }
public ImmutableList<SuffixFormSequenceRule> getRules() { return rules; }
SuffixFormSequence { public ImmutableList<SuffixFormSequenceRule> getRules() { return rules; } }
SuffixFormSequence { public ImmutableList<SuffixFormSequenceRule> getRules() { return rules; } SuffixFormSequence(String suffixFormStr); }
SuffixFormSequence { public ImmutableList<SuffixFormSequenceRule> getRules() { return rules; } SuffixFormSequence(String suffixFormStr); ImmutableList<SuffixFormSequenceRule> getRules(); String getSuffixFormStr(); @SuppressWarnings("UnusedDeclaration") boolean isBlank(); boolean isNotBlank(); boolean isFirstLetterVowel(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean lastLetterCanBeVoiced(); }
SuffixFormSequence { public ImmutableList<SuffixFormSequenceRule> getRules() { return rules; } SuffixFormSequence(String suffixFormStr); ImmutableList<SuffixFormSequenceRule> getRules(); String getSuffixFormStr(); @SuppressWarnings("UnusedDeclaration") boolean isBlank(); boolean isNotBlank(); boolean isFirstLetterVowel(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean lastLetterCanBeVoiced();  }