public class DocOrderComparator
extends java.lang.Object
implements java.util.Comparator
| Constructor and Description | 
|---|
DocOrderComparator()
Creates a new  
DocOrderComparator. | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compare(java.lang.Object o1, java.lang.Object o2)
Compares the two given nodes' document order. 
 | 
static int | 
compareNodes(org.w3c.dom.Node n1, org.w3c.dom.Node n2)  | 
boolean | 
equals(java.lang.Object obj)  | 
public int compare(java.lang.Object o1,
          java.lang.Object o2)
compare in interface java.util.Comparatoro1 - The first Node to compare.o2 - The second Node to compare.-1 if o1 precedes o2 in document order; returns 0 if they have the same document order; returns 1 if o2 precedes o1.java.lang.ClassCastException - If either o1 or o2 is not an instance of org.w3c.dom.Node.java.lang.IllegalArgumentException - If the two nodes cannot legitimately be compared for document order (e.g., they are not in the same document).public boolean equals(java.lang.Object obj)
equals in interface java.util.Comparatorequals in class java.lang.Object
public static int compareNodes(org.w3c.dom.Node n1,
               org.w3c.dom.Node n2)
                        throws XPathException
XPathException