Exemple #1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            AndMatcher <TKey> other = (AndMatcher <TKey>)obj;

            if (LeftOperand == null)
            {
                if (other.LeftOperand != null)
                {
                    return(false);
                }
            }
            else if (!LeftOperand.Equals(other.LeftOperand))
            {
                return(false);
            }
            if (RightOperand == null)
            {
                if (other.RightOperand != null)
                {
                    return(false);
                }
            }
            else if (!RightOperand.Equals(other.RightOperand))
            {
                return(false);
            }
            return(true);
        }
Exemple #2
0
 public override bool Equals(object obj)
 {
     if (this == obj)
     {
         return true;
     }
     if (obj == null)
     {
         return false;
     }
     if (GetType() != obj.GetType())
     {
         return false;
     }
     AndMatcher<TKey> other = (AndMatcher<TKey>) obj;
     if (leftOperand == null)
     {
         if (other.leftOperand != null)
         {
             return false;
         }
     }
     else if (!leftOperand.Equals(other.leftOperand))
     {
         return false;
     }
     if (rightOperand == null)
     {
         if (other.rightOperand != null)
         {
             return false;
         }
     }
     else if (!rightOperand.Equals(other.rightOperand))
     {
         return false;
     }
     return true;
 }