예제 #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);
 }
예제 #2
0
 public string Symbol()
 {
     if (VowelFirst)
     {
         return(Vowel.Symbol() + "|" + Consonant.Symbol());
     }
     else
     {
         return(Consonant.Symbol() + "|" + Vowel.Symbol());
     }
 }
예제 #3
0
 public override int GetHashCode()
 {
     return(HashCode.Combine(Consonant.Symbol(), Vowel.Symbol(), VowelIsStressed, VowelFirst));
 }