public class XPathComparator extends Object implements Comparator
Modifier and Type | Class and Description |
---|---|
static class |
XPathComparator.XPathSortException
My own runtime exception in case something goes wrong with sort.
|
Constructor and Description |
---|
XPathComparator() |
XPathComparator(org.jaxen.XPath xpath,
boolean descending) |
Modifier and Type | Method and Description |
---|---|
int |
compare(org.dom4j.Node n1,
org.dom4j.Node n2) |
int |
compare(Object o1,
Object o2) |
protected Comparable |
getComparableValue(Object value)
Turns the XPath result value into a Comparable object.
|
org.jaxen.XPath |
getXpath() |
void |
setDescending(boolean descending) |
void |
setXpath(org.jaxen.XPath xpath) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public XPathComparator()
public XPathComparator(org.jaxen.XPath xpath, boolean descending)
public void setXpath(org.jaxen.XPath xpath)
public org.jaxen.XPath getXpath()
public void setDescending(boolean descending)
public int compare(Object o1, Object o2)
compare
in interface Comparator
public int compare(org.dom4j.Node n1, org.dom4j.Node n2)
protected Comparable getComparableValue(Object value)
Copyright © 2014 Apache Software Foundation. All rights reserved.