Class ComparableComparator<T extends Comparable>
- java.lang.Object
-
- org.hibernate.internal.util.compare.ComparableComparator<T>
-
- All Implemented Interfaces:
Serializable
,Comparator<T>
public class ComparableComparator<T extends Comparable> extends Object implements Comparator<T>, Serializable
Delegates to Comparable- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator
INSTANCE
-
Constructor Summary
Constructors Constructor Description ComparableComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Comparable one, Comparable another)
static <T extends Comparable>
Comparator<T>instance()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
INSTANCE
public static final Comparator INSTANCE
-
-
Method Detail
-
instance
public static <T extends Comparable> Comparator<T> instance()
-
compare
public int compare(Comparable one, Comparable another)
- Specified by:
compare
in interfaceComparator<T extends Comparable>
-
-