Class GlobalOrderComparer

java.lang.Object
net.sf.saxon.expr.sort.GlobalOrderComparer
All Implemented Interfaces:
Comparator<Item>, ItemOrderComparer

public final class GlobalOrderComparer extends Object implements ItemOrderComparer
A Comparer used for comparing nodes in document order. This comparer is used when there is no guarantee that the nodes being compared come from the same document
  • Constructor Details

    • GlobalOrderComparer

      public GlobalOrderComparer()
  • Method Details

    • getInstance

      public static GlobalOrderComparer getInstance()
      Get an instance of a GlobalOrderComparer. The class maintains no state so this returns the same instance every time.
    • compare

      public int compare(Item a, Item b)
      Description copied from interface: ItemOrderComparer
      Compare two objects.
      Specified by:
      compare in interface Comparator<Item>
      Specified by:
      compare in interface ItemOrderComparer
      Returns:
      <0 if a<b, 0 if a=b, >0 if a>b