Example #1
0
 //1 se j1>j2   -1 se j2>j1     0 se j1=j2
 private static int CompareProcTime(Job j1, Job j2)
 {
     int pt1 = j1.getProcessingTime();
        int pt2 = j2.getProcessingTime();
        if (pt1 == pt2)
        return 0;
        else if (pt1 > pt2)
        return 1;
        else
        return -1;
 }
Example #2
0
 //1 se j1>j2   -1 se j2>j1     0 se j1=j2
 private static int CompareDueDate(Job j1, Job j2)
 {
     int dd1= j1.getDueDateTime();
     int dd2 = j2.getDueDateTime();
     if (dd1 == dd2)
         return 0;
     else if (dd1 > dd2)
         return 1;
     else
         return -1;
 }