My suggestion is that you use Collections.sort()
for ordering lists. It does the sorting for you, and makes it a lot more readable what you are trying to do. You'll need to specify your own Comparator
when calling the method - as such:
Collections.sort(workingList,new Comparator<Time[]>() {
@Override
public int compare(Time[] time1, Time[] time2) {
return time1[0].before(time2[0]);
}
});
This will sort workingList as your specs.