Пример #1
0
        //-----------------------------------------------------------------------

        /**
         * Implement a hash code for this comparator that is consistent with
         * {@link #equals(Object) equals}.
         *
         * @return a suitable hash code
         * @since Commons Collections 3.0
         */
        public int hashCode()
        {
            return("ReverseComparator".GetHashCode() ^ comparator.GetHashCode());
        }
        //-----------------------------------------------------------------------

        /**
         *  Implement a hash code for this comparator that is consistent with
         *  {@link #equals(Object)}.
         *
         *  @return a hash code for this comparator.
         **/
        public int hashCode()
        {
            return((nullsAreHigh ? -1 : 1) * nonNullComparator.GetHashCode());
        }