jd.xml.xpath.model
Class NodeComparator

java.lang.Object
  extended byjd.xml.xpath.model.NodeComparator
All Implemented Interfaces:
Comparator

public class NodeComparator
extends Object
implements Comparator

A Comparator for XPathNodes.


Field Summary
static NodeComparator INSTANCE
           
 
Fields inherited from interface jd.util.Comparator
STRING_COMPARATOR
 
Constructor Summary
NodeComparator()
           
 
Method Summary
 int compare(Object node1, Object node2)
          Compare the two arguments for order.
 void sort(XPathNode[] nodes, int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NodeComparator INSTANCE
Constructor Detail

NodeComparator

public NodeComparator()
Method Detail

sort

public void sort(XPathNode[] nodes,
                 int size)

compare

public int compare(Object node1,
                   Object node2)
Description copied from interface: Comparator
Compare the two arguments for order. Return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface Comparator