001package de.cuioss.test.jsf.renderer.util;
002
003import java.io.Serializable;
004import java.util.Comparator;
005
006import org.jdom2.Attribute;
007
008/**
009 * Compares two {@link Attribute} elements by name
010 *
011 * @author Oliver Wolff
012 */
013public class AttributeComparator implements Comparator<Attribute>, Serializable {
014
015    private static final long serialVersionUID = 2093668555465640881L;
016
017    @Override
018    public int compare(final Attribute o1, final Attribute o2) {
019        return o1.getName().compareTo(o2.getName());
020    }
021
022}