Example #1
0
 public override bool Equals(object?obj)
 {
     return(obj is Transition transition &&
            Vowel.Symbol() == transition.Vowel.Symbol() &&
            Consonant.Symbol() == transition.Consonant.Symbol() &&
            VowelIsStressed == transition.VowelIsStressed);
 }
Example #2
0
 public string Symbol()
 {
     if (VowelFirst)
     {
         return(Vowel.Symbol() + "|" + Consonant.Symbol());
     }
     else
     {
         return(Consonant.Symbol() + "|" + Vowel.Symbol());
     }
 }
Example #3
0
 public override int GetHashCode()
 {
     return(HashCode.Combine(Consonant.Symbol(), Vowel.Symbol(), VowelIsStressed, VowelFirst));
 }