goldman
Class ReverseComparator<T>
java.lang.Object
goldman.ReverseComparator<T>
- All Implemented Interfaces:
- Comparator<T>
public class ReverseComparator<T>
- extends Object
- implements Comparator<T>
The ReverseComparator class wraps a provided comparator, reversing
the sign of the output.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReverseComparator
public ReverseComparator(Comparator<? super T> comp)
compare
public final int compare(T a,
T b)
- Specified by:
compare
in interface Comparator<T>