@jackturky instead of
public int compare(String s1, String s2) {
int c = s2.length() - s1.length();
if (c == 0)
c = s1.compareToIgnoreCase(s2);
return c;
}
why not write like (this of course checking null and empty string)
public int compare(String s1, String s2) {
return s1.compareToIgnoreCase(s2);
}