
com.webcohesion.enunciate.util.ResourceGroupComparator 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.resources.ResourceGroup;
import java.util.Comparator;
/**
* @author Ryan Heaton
*/
public class ResourceGroupComparator implements Comparator {
private final Comparator pathComparator;
public ResourceGroupComparator(PathSortStrategy strategy) {
if (strategy == PathSortStrategy.breadth_first) {
pathComparator = new BreadthFirstResourcePathComparator();
}
else {
pathComparator = new DepthFirstResourcePathComparator();
}
}
@Override
public int compare(ResourceGroup g1, ResourceGroup g2) {
return pathComparator.compare(g1.getSortKey(), g2.getSortKey());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy