
com.webcohesion.enunciate.util.PathSummaryComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enunciate-core Show documentation
Show all versions of enunciate-core Show documentation
Enunciate core classes that are needed at Enunciate build-time.
package com.webcohesion.enunciate.util;
import com.webcohesion.enunciate.api.PathSummary;
import java.util.Comparator;
/**
* @author Ryan Heaton
*/
public class PathSummaryComparator implements Comparator {
private final Comparator pathComparator;
public PathSummaryComparator(PathSortStrategy strategy) {
if (strategy== PathSortStrategy.breadth_first) {
pathComparator = new BreadthFirstResourcePathComparator();
} else {
pathComparator = new DepthFirstResourcePathComparator();
}
}
@Override
public int compare(PathSummary p1, PathSummary p2) {
return pathComparator.compare(p1.getPath(), p2.getPath());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy