This might be useful for IDE plugins; I'm using it in the JBuilder plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3943 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
11
pmd/src/net/sourceforge/pmd/cpd/MatchLengthComparator.java
Normal file
11
pmd/src/net/sourceforge/pmd/cpd/MatchLengthComparator.java
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package net.sourceforge.pmd.cpd;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
public class MatchLengthComparator implements Comparator {
|
||||||
|
public int compare(Object o1, Object o2) {
|
||||||
|
Match m1 = (Match)o1;
|
||||||
|
Match m2 = (Match)o2;
|
||||||
|
return m2.getLineCount() - m1.getLineCount();
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user