Re: Sorting on multiple conditions
Posted By:
Robert_Lybarger
Posted On:
Wednesday, November 7, 2007 08:28 AM
Usually you need to write just one Comparator implementation that does all the checks you need. In your case, first compare the date members. If the comparison is non-zero, return that value. If that first comparison is zero, then compare the id members and return that value. (Or does this not sound like what you need? It's early for me yet...)