// Precondition: the conflict attribute needs to be set // for each job, otherwise they are all 0. // # conflicts cannot be determined until all jobs created. import java.util.Comparator; public class JobConflictComparator implements Comparator { public int compare(Object a, Object b) { int t1 = ((Job) a).getConflict(); int t2 = ((Job) b).getConflict(); return t1 - t2; } }