net.sf.saxon.sort

Class DescendingComparer

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.
Constructor Summary
DescendingComparer(Comparator base)
Method Summary
intcompare(Object a, Object b)
Compare two objects.

Constructor Detail

DescendingComparer

public DescendingComparer(Comparator base)

Method Detail

compare

public int compare(Object a, Object b)
Compare two objects.

Returns: <0 if a0 if a>b

Throws: ClassCastException if the objects are of the wrong type for this Comparer