- Type Parameters:
T
- The type being compared. Must be Comparable
.
- All Implemented Interfaces:
- CloneableSerializable, java.io.Serializable, java.lang.Cloneable, java.util.Comparator<T>
@CodeReview(reviewer="Kevin R. Dixon",
date="2008-12-02",
changesNeeded=false,
comments="Looks good.")
public class DefaultComparator<T extends java.lang.Comparable<? super T>>
extends AbstractCloneableSerializable
implements java.util.Comparator<T>
A default comparator that just calls compare on the comparable generic
it uses. Thus, it creates the natural ordering according to the compareTo
method on the Comparable
objects it is given.
- Since:
- 2.1
- Author:
- Justin Basilico
- See Also:
- Serialized Form