I want to sort a collection based on multiple properties. I can sort using one, but how do I expand it to include many properties? I have a sort order; property one, then two, then three.
This is what I have, sorting using one property...
class StringComparator implements Comparator {
public int compare( Object object1, Object object2 ) {
return ((
String) object1).compareTo( (String) object2 );
}
}