Equals() public method

public Equals ( Object value ) : bool
value Object
return bool
示例#1
0
        // Equals method for the comparer itself.
        public override bool Equals(object obj)
        {
            CultureAwareComparer comparer = obj as CultureAwareComparer;

            return
                (comparer != null &&
                 _options == comparer._options &&
                 _compareInfo.Equals(comparer._compareInfo));
        }
示例#2
0
            // Equals method for the comparer itself.
            public override bool Equals(Object obj)
            {
                CultureAwareComparer comparer = obj as CultureAwareComparer;

                if (comparer == null)
                {
                    return(false);
                }
                return((_ignoreCase == comparer._ignoreCase) && (_compareInfo.Equals(comparer._compareInfo)));
            }
 //@Override
 public  override bool Equals(System.Object obj)
 {
     if (this == obj)
         return true;
     if (!base.Equals(obj))
         return false;
     if (GetType() != obj.GetType())
         return false;
     TermRangeQuery other = (TermRangeQuery) obj;
     if (collator == null)
     {
         if (other.collator != null)
             return false;
     }
     else if (!collator.Equals(other.collator))
         return false;
     if (field == null)
     {
         if (other.field != null)
             return false;
     }
     else if (!field.Equals(other.field))
         return false;
     if (includeLower != other.includeLower)
         return false;
     if (includeUpper != other.includeUpper)
         return false;
     if (lowerTerm == null)
     {
         if (other.lowerTerm != null)
             return false;
     }
     else if (!lowerTerm.Equals(other.lowerTerm))
         return false;
     if (upperTerm == null)
     {
         if (other.upperTerm != null)
             return false;
     }
     else if (!upperTerm.Equals(other.upperTerm))
         return false;
     return true;
 }