code: private void sortFileList() {
      if (this.size() > 1) {
        Collections.sort(this.fileList, new Comparator() {
  
          public final int compare(final Object o1, final Object o2) {
            final File f1 = (File) o1;
            final File f2 = (File) o2;
            final Object[] f1TimeAndCount = backupSuffixHelper
                .backupTimeAndCount(f1.getName(), baseFile);
            final Object[] f2TimeAndCount = backupSuffixHelper
                .backupTimeAndCount(f2.getName(), baseFile);
            final long f1TimeSuffix = ((Long) f1TimeAndCount[0]).longValue();
            final long f2TimeSuffix = ((Long) f2TimeAndCount[0]).longValue();
            if ((0L == f1TimeSuffix) && (0L == f2TimeSuffix)) {
              final long f1Time = f1.lastModified();
              final long f2Time = f2.lastModified();
              if (f1Time < f2Time) {
                return -1;
              }
              if (f1Time > f2Time) {
                return 1;
              }
              return 0;
            }
            if (f1TimeSuffix < f2TimeSuffix) {
              return -1;
            }
            if (f1TimeSuffix > f2TimeSuffix) {
              return 1;
            }
            final int f1Count = ((Integer) f1TimeAndCount[1]).intValue();
            final int f2Count = ((Integer) f2TimeAndCount[1]).intValue();
            if (f1Count < f2Count) {
              return -1;
            }
            if (f1Count > f2Count) {
              return 1;
            }
            if (f1Count == f2Count) {
              if (fileHelper.isCompressed(f1)) {
                return -1;
              }
              if (fileHelper.isCompressed(f2)) {
                return 1;
              }
            }
            return 0;
          }
        });
      }
    }
docs: Sort by time bucket, then backup count, and by compression state.