/// <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); }
/// <summary> /// Returns true if <code>o</code> is equal to this. If a /// <seealso cref="FieldComparatorSource"/> or {@link /// FieldCache.Parser} was provided, it must properly /// implement hashCode (unless a singleton is always /// used). /// </summary> public override int GetHashCode() { int hash = (int)(type.GetHashCode() ^ 0x346565dd + reverse.GetHashCode() ^ 0xaf5998bb); if (field != null) { hash += (int)(field.GetHashCode() ^ 0xff5685dd); } if (comparatorSource != null) { hash += comparatorSource.GetHashCode(); } return(hash); }