/// <summary>
        /// Checks the equality of objects.
        /// </summary>
        /// <param name="obj">Object to be checked.</param>
        /// <returns>True if the objects are equal, false otherwise.</returns>
        public override bool Equals(object obj)
        {
            PredicateExpression other = obj as PredicateExpression;

            if (other == null)
            {
                return(false);
            }
            return(PredicateAtom.Equals(other.PredicateAtom));
        }
Beispiel #2
0
        /// <summary>
        /// Checks the equality of objects.
        /// </summary>
        /// <param name="obj">Object to be checked.</param>
        /// <returns>True if the objects are equal, false otherwise.</returns>
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return true;
            }

            PredicateLiteralCNF other = obj as PredicateLiteralCNF;
            if (other == null)
            {
                return false;
            }

            return (PredicateAtom.Equals(other.PredicateAtom) && IsNegated == other.IsNegated);
        }