scheduler-simulator

git clone git://git.codymlewis.com/scheduler-simulator.git
Log | Files | Refs | README

SortbyPid.java (339B)


      1 import java.util.Comparator;
      2 
      3 /**
      4  * <h1>SortbyPid - Comp2240A1</h1>
      5  * Sort the processes by their id
      6  *
      7  * @author Cody Lewis (c3283349)
      8  * @version 1
      9  * @since 2019-08-17
     10  */
     11 
     12 public class SortbyPid implements Comparator<Process> {
     13     public int compare(Process a, Process b) {
     14         return a.getPid().compareTo(b.getPid());
     15     }
     16 }