org.pitest.mutationtest.tooling.PathComparator Maven / Gradle / Ivy
package org.pitest.mutationtest.tooling;
import java.util.Comparator;
/**
* Comparator to allow ordering of Objects by their closeness to a
* given root, assuming their toString provides a path like hierarchy.
*
* Allows paths in same module as a file to be examined before those in other modules.
*
* Expects the base path supplied to be deeper than the shared root (e.g.
* /a/b/c/target/pit-reports when shared root is a/b/c)
*
*/
class PathComparator implements Comparator