org.apache.poi.util
Class XmlSort.QNameComparator
java.lang.Object
org.apache.poi.util.XmlSort.QNameComparator
- All Implemented Interfaces:
- java.util.Comparator<org.apache.xmlbeans.XmlCursor>
- Enclosing class:
- XmlSort
public static final class XmlSort.QNameComparator
- extends java.lang.Object
- implements java.util.Comparator<org.apache.xmlbeans.XmlCursor>
Implements a java.util.Comparator
for comparing QName
values.
The namespace URIs are compared first and if they are equal, the local parts are compared.
The constructor accepts an argument indicating whether the comparison order is the same as
the lexicographic order of the strings or the reverse.
Method Summary |
int |
compare(org.apache.xmlbeans.XmlCursor cursor1,
org.apache.xmlbeans.XmlCursor cursor2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
ASCENDING
public static final int ASCENDING
- See Also:
- Constant Field Values
DESCENDING
public static final int DESCENDING
- See Also:
- Constant Field Values
XmlSort.QNameComparator
public XmlSort.QNameComparator(int order)
compare
public int compare(org.apache.xmlbeans.XmlCursor cursor1,
org.apache.xmlbeans.XmlCursor cursor2)
- Specified by:
compare
in interface java.util.Comparator<org.apache.xmlbeans.XmlCursor>
Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.