List<Job> jobList = sourceDataManager.getCurrentJobs(sourceDataList);
Collections.sort(jobList, new Comparator<Job>() {
public int compare(Job j1, Job j2) {
int result = j1.getJobType().getShortDescription().compareTo(j2.getJobType().getShortDescription());
if (result == 0) {
result = j1.getJobNumber().compareTo(j2.getJobNumber());
}
if (result == 0) {
result = j2.getJobRevNumber().compareTo(j1.getJobRevNumber());
}
return result;
}
});
public static void main(String args[]) {System.out.println("Hello World!!");}<script src="https://gist.github.com/anonymous/f51054324df5e67acea8.js"></script>
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home