/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simizer.requests;

import java.util.Comparator;

/**
 *
 * @author isep
 */
public class RequestComparator implements Comparator<Request> {

    @Override
    public int compare(Request t, Request t1) {
        if(t.equals(t1)) {
            return 0;
        }
        else if(t.artime < t1.artime) {
            return -1;
        }
        else if(t.artime == t1.artime) {
            return 0;
        }
        else {
            return 1;
        }
    }
    
}

@@ -1,576 +1,782 @@
-/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage simizer.requests;%0A%0Aimport java.util.Comparator;%0A%0A/**%0A *%0A * @author isep%0A */%0Apublic class RequestComparator implements Comparator%3CRequest%3E %7B%0A%0A    @Override%0A    public int compare(Request t, Request t1) %7B%0A        if(t.equals(t1)) %7B
+package simizer.requests;%0A%0Aimport java.util.Comparator;%0A%0A/**%0A * Compares two %7B@code Request%7D objects by their arrival timestamps.%0A * %3Cp%3E%0A * This %7B@link Comparator%7D can be used to order %7B@link Request%7D objects by their%0A * arrival timestamps in ascending order.%0A */%0Apublic class RequestComparator implements Comparator%3CRequest%3E %7B%0A%0A  /**%0A   * Compares two %7B@code Request%7D objects to see which comes first.
 %0A   
+*%0A
    
-      return 0;%0A        %7D%0A        else if(t.artime %3C t1.artime) %7B%0A            return -1;%0A        %7D%0A        else if(t.artime == t1.artime) %7B%0A            return 0;%0A        %7D%0A        else %7B%0A            return 1;%0A        %7D%0A 
+* @param first the object to compare%0A   * @param second the object to compare against%0A   * @return a negative value, zero, or a positive value if the first object is%0A   *             less than, equal to, or greater than the second object%0A   */%0A  @Override%0A  public int compare(Request first, Request second) %7B%0A    return Long.compare(first.artime, second.artime);%0A
   
- 
 %7D%0A
-    
 %0A%7D%0A

Update the RequestComparator class.