import java.util.Comparator;
/**
* Case insensitive sort (upper and lower cased intermixed).
* <p/>
* Defines an alternate sort order for String.
*
* @author Roedy Green
* @version 1.0 2009-10-02 - initial release
* @since 2009-10-02
*/
class Insensitive implements Comparator<String>
{
/**
* Case insensitive sort (upper and lower cased intermixed).
* Defines an alternate sort order for String with JDK 1.5+ generics.
* Compare two String Objects.
* Informally, returns (a-b), or +ve if a is more positive than b.
*
* @param a first String to compare
* @param b second String to compare
*
* @return +ve if a>b, 0 if a==b, -ve if a<b
*/
public final int compare( String a, String b )
{
return a.compareToIgnoreCase( b );
}
}