org.apache.poi.util
Class XmlSort.QNameComparator

java.lang.Object
  extended by 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 QNamevalues. 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.


Field Summary
static int ASCENDING
           
static int DESCENDING
           
 
Constructor Summary
XmlSort.QNameComparator(int order)
           
 
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
 

Field Detail

ASCENDING

public static final int ASCENDING
See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
See Also:
Constant Field Values
Constructor Detail

XmlSort.QNameComparator

public XmlSort.QNameComparator(int order)
Method Detail

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.