FileDocCategorySizeDatePackage
ReverseComparator.javaAPI DocHibernate 3.2.5466Sun Sep 26 00:18:28 BST 2004org.hibernate.test.legacy

ReverseComparator.java

//$Id: ReverseComparator.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy;

import java.io.Serializable;
import java.util.Comparator;

public final class ReverseComparator implements Comparator, Serializable {
	public int compare(Object x, Object y) {
		return - ( (Comparable) x ).compareTo(y);
	}
	
	public boolean equals(Object obj) {
		return obj instanceof ReverseComparator;
	}
	
	public int hashCode() {
		return 0;
	}
	
}