org.helidb.util
Class ComparableComparator<T extends Comparable<T>>
java.lang.Object
org.helidb.util.ComparableComparator<T>
- Type Parameters:
T - The types of objects that this comparator compares.
- All Implemented Interfaces:
- Serializable, Comparator<T>
public final class ComparableComparator<T extends Comparable<T>>
- extends Object
- implements Comparator<T>, Serializable
This Comparator compares Comparable objects. I.e, the
compare(Comparable, Comparable) method delegates to the compared
objects' Comparable.compareTo(Object) function.
- Since:
- 1.1
- Author:
- Karl Gustafsson
- See Also:
- Serialized Form
- In_jar:
- helidb-core
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComparableComparator
public ComparableComparator()
compare
public int compare(T o1,
T o2)
- This method delegates to the
Comparable.compareTo(Object) method
of o1.
- Specified by:
compare in interface Comparator<T extends Comparable<T>>