code: public int compare(FileStatus fileStatus1, FileStatus fileStatus2) {
  
      // Do the obligatory null checks.
      if ((fileStatus1 == null) && (fileStatus2 == null)) {
        return 0;
      }
      if (fileStatus1 == null) {
        return -1;
      }
      if (fileStatus2 == null) {
        return 1;
      }
  
      long modificationTime1 = fileStatus1.getModificationTime();
      long modificationTime2 = fileStatus2.getModificationTime();
  
      return (modificationTime1 < modificationTime2 ? -1
          : (modificationTime1 == modificationTime2 ? 0 : 1));
    }
docs: /*
  (non-Javadoc)
  
  @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)