com.fasterxml.sort.util
Class NaturalComparator<T extends Comparable<T>>
java.lang.Object
com.fasterxml.sort.util.NaturalComparator<T>
- All Implemented Interfaces:
- Comparator<T>
public class NaturalComparator<T extends Comparable<T>>
- extends Object
- implements Comparator<T>
Simple Comparator implementation that can be used
when items to compare have "natural" sorting order that
can be used via Comparable interface.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaturalComparator
public NaturalComparator()
compare
public int compare(T arg0,
T arg1)
- Specified by:
compare in interface Comparator<T extends Comparable<T>>
Copyright © 2011. All Rights Reserved.