com.facebook.presto.hive.$internal.jodd.util.ComparableComparator Maven / Gradle / Ivy
// Copyright (c) 2003-2014, Jodd Team (com.facebook.presto.hive.$internal.jodd.org). All Rights Reserved.
package com.facebook.presto.hive.$internal.jodd.util;
import java.util.Comparator;
/**
* Comparator that adapts Comparables
to the Comparator
interface.
*/
public class ComparableComparator> implements Comparator {
/**
* Cached instance.
*/
public static final ComparableComparator INSTANCE = new ComparableComparator();
public int compare(T o1, T o2) {
return o1.compareTo(o2);
}
}