2
* Copyright © 2008-2012 NetAllied Systems GmbH, Ravensburg, Germany.
4
* Licensed under the MIT Open Source License,
5
* for details please see LICENSE file or the website
6
* http://www.opensource.org/licenses/mit-license.php
8
package de.netallied.xsd2cppsax;
10
import java.util.Comparator;
11
import java.util.SortedMap;
13
import org.apache.xerces.xs.XSElementDeclaration;
16
* Allows comparison of {@link XSElementDeclaration}s. That way they can be used
17
* as keys in a {@link SortedMap}.
20
public class XSElementComparator implements Comparator<XSElementDeclaration> {
25
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
27
public int compare(XSElementDeclaration o1, XSElementDeclaration o2) {
31
String str01 = o1.toString();
32
String str02 = o2.toString();
33
return str01.compareTo(str02);