gr.uom.java.xmi.diff.ClassMoveComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refactoring-miner Show documentation
Show all versions of refactoring-miner Show documentation
RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.
package gr.uom.java.xmi.diff;
import java.util.Comparator;
public class ClassMoveComparator implements Comparator {
@Override
public int compare(UMLClassMoveDiff o1, UMLClassMoveDiff o2) {
double sourceFolderDistance1 = o1.getMovedClass().normalizedSourceFolderDistance(o1.getOriginalClass());
double sourceFolderDistance2 = o2.getMovedClass().normalizedSourceFolderDistance(o2.getOriginalClass());
return Double.compare(sourceFolderDistance1, sourceFolderDistance2);
}
}