Esempio n. 1
0
        public bool Equals(Environment other)
        {
            if (other == null)
            {
                return(false);
            }

            if (m_leftEnv == null)
            {
                if (other.m_leftEnv != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!m_leftEnv.Equals(other.m_leftEnv))
                {
                    return(false);
                }
            }

            if (m_rightEnv == null)
            {
                if (other.m_rightEnv != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!m_rightEnv.Equals(other.m_rightEnv))
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 2
0
            public override bool ConstraintsEqual(Allomorph other)
            {
                Subrule otherSubrule = (Subrule)other;

                if (m_requiredMPRFeatures == null)
                {
                    if (otherSubrule.m_requiredMPRFeatures != null)
                    {
                        return(false);
                    }
                }
                else
                {
                    if (!m_requiredMPRFeatures.Equals(otherSubrule.m_requiredMPRFeatures))
                    {
                        return(false);
                    }
                }

                if (m_excludedMPRFeatures == null)
                {
                    if (otherSubrule.m_excludedMPRFeatures != null)
                    {
                        return(false);
                    }
                }
                else
                {
                    if (!m_excludedMPRFeatures.Equals(otherSubrule.m_excludedMPRFeatures))
                    {
                        return(false);
                    }
                }

                return(m_lhsTemp.Equals(otherSubrule.m_lhsTemp) && base.ConstraintsEqual(other));
            }