net.sf.saxon.sort
Class DescendingComparer
java.lang.Object
net.sf.saxon.sort.DescendingComparer
- All Implemented Interfaces:
- Serializable, Comparator
public class DescendingComparer
- extends Object
- implements Comparator, Serializable
A Comparer used for comparing descending keys. This simply returns the inverse of the result
delivered by the base comparer.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DescendingComparer
public DescendingComparer(Comparator base)
compare
public int compare(Object a,
Object b)
- Compare two objects.
- Specified by:
compare
in interface Comparator
- Returns:
- <0 if a0 if a>b
- Throws:
ClassCastException
- if the objects are of the wrong type for this Comparer