/** * Returns <code>true</code> iff <i>that</i> Object is * is a {@link Comparator} whose ordering is known to be * equivalent to mine. * <p> * This implementation returns <code>true</code> * iff <code><i>object</i>.{@link Object#getClass() getClass()}</code> * equals <code>this.getClass()</code>, and the underlying * comparators are equal. * Subclasses may want to override this behavior to remain consistent * with the {@link Comparator#equals(Object) equals} contract. * * @param object the object to compare to * @return true if equal * @since Commons Collections 3.0 */ public bool equals(Object obj) { if (this == obj) { return(true); } else if (null == obj) { return(false); } else if (obj.GetType().Equals(this.GetType())) { ReverseComparator thatrc = (ReverseComparator)obj; return(comparator.equals(thatrc.comparator)); } else { return(false); } }