Example #1
0
        /// <summary>Returns true if <code>o</code> is equal to this.  If a
        /// {@link SortComparatorSource} (deprecated) or {@link
        /// FieldCache.Parser} was provided, it must properly
        /// implement hashCode (unless a singleton is always
        /// used).
        /// </summary>
        public override int GetHashCode()
        {
            int hash = type ^ 0x346565dd + (reverse ? Boolean.TrueString.GetHashCode() : Boolean.FalseString.GetHashCode()) ^ unchecked ((int)0xaf5998bb);

            if (field != null)
            {
                hash += (field.GetHashCode() ^ unchecked ((int)0xff5685dd));
            }
            if (locale != null)
            {
                hash += (locale.GetHashCode() ^ 0x08150815);
            }
            if (factory != null)
            {
                hash += (factory.GetHashCode() ^ 0x34987555);
            }
            if (comparatorSource != null)
            {
                hash += comparatorSource.GetHashCode();
            }
            if (parser != null)
            {
                hash += (parser.GetHashCode() ^ 0x3aaf56ff);
            }
            return(hash);
        }