info.aduna.collections
Class ReverseComparator<T>
java.lang.Object
info.aduna.collections.ReverseComparator<T>
- All Implemented Interfaces:
- Comparator<T>
public class ReverseComparator<T>
- extends Object
- implements Comparator<T>
ReverseComparator reverses the result of another Comparator.
|
Constructor Summary |
ReverseComparator(Comparator<T> other)
Construct a new reverse comparator that reverses the result of the
specified comparator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReverseComparator
public ReverseComparator(Comparator<T> other)
- Construct a new reverse comparator that reverses the result of the
specified comparator.
- Parameters:
other - the comparator to reverse
compare
public int compare(T o1,
T o2)
- Specified by:
compare in interface Comparator<T>
Copyright © 1997-2008 Aduna. All Rights Reserved.