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:
  • Constructor Details

    • DescendingComparer

      public DescendingComparer(Comparator base)
  • Method Details

    • compare

      public int compare(Object a, Object b)
      Compare two objects.
      Specified by:
      compare in interface Comparator
      Returns:
      invalid input: '<'0 if ainvalid input: '<'b, 0 if a=b, >0 if a>b
      Throws:
      ClassCastException - if the objects are of the wrong type for this Comparer