FileDocCategorySizeDatePackage
ComparableComparator.javaAPI DocHibernate 3.2.5411Sat Sep 04 08:01:56 BST 2004org.hibernate.util

ComparableComparator.java

//$Id: ComparableComparator.java 4496 2004-09-04 13:01:55Z oneovthafew $
package org.hibernate.util;

import java.util.Comparator;

/**
 * Delegates to Comparable
 * @author Gavin King
 */
public class ComparableComparator implements Comparator {

	public int compare(Object x, Object y) {
		return ( (Comparable) x ).compareTo(y);
	}
	
	public static final Comparator INSTANCE = new ComparableComparator();

}