1 21 22 package net.sourceforge.cobertura.reporting.html; 23 24 import java.io.Serializable ; 25 import java.util.Comparator ; 26 27 import net.sourceforge.cobertura.coveragedata.SourceFileData; 28 29 public class SourceFileDataBaseNameComparator implements Comparator , Serializable 30 { 31 32 private static final long serialVersionUID = 0L; 33 34 public int compare(Object arg0, Object arg1) 35 { 36 SourceFileData sourceFileData0 = (SourceFileData)arg0; 37 SourceFileData sourceFileData1 = (SourceFileData)arg1; 38 int comparison = sourceFileData0.getBaseName().compareTo(sourceFileData1.getBaseName()); 39 if (comparison != 0) 40 return comparison; 41 return sourceFileData0.getName().compareTo(sourceFileData1.getName()); 42 } 43 44 } 45 | Popular Tags |