All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pitest.mutationtest.build.AnalysisPriorityComparator Maven / Gradle / Ivy

There is a newer version: 1.17.1
Show newest version
package org.pitest.mutationtest.build;

import java.io.Serializable;
import java.util.Comparator;

/**
 * Comparator to prioritise the order of mutation analysis units.
 *
 * The ones with the most mutations are run first. This should make it less
 * likely that a single thread remains running at the of a run because it has
 * just picked up a large unit.
 *
 */
class AnalysisPriorityComparator implements Comparator,
Serializable {

  private static final long serialVersionUID = 1L;

  @Override
  public int compare(final MutationAnalysisUnit a, final MutationAnalysisUnit b) {
    return b.priority() - a.priority();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy