Changeset 27 for trunk/CrossPare/src/de
- Timestamp:
- 01/26/15 11:43:30 (10 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/Experiment.java
r6 r27 2 2 3 3 import java.io.File; 4 import java.util.Collections; 4 5 import java.util.LinkedList; 5 6 import java.util.List; … … 90 91 } 91 92 93 // sort versions 94 Collections.sort(versions); 95 92 96 for( SoftwareVersion testVersion : versions ) { 93 97 if( isVersion(testVersion, config.getTestVersionFilters()) ) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/versions/SoftwareVersion.java
r2 r27 7 7 * @author Steffen Herbold 8 8 */ 9 public class SoftwareVersion {9 public class SoftwareVersion implements Comparable<SoftwareVersion> { 10 10 11 11 /** … … 59 59 return new Instances(instances); 60 60 } 61 62 /** 63 * Compares first based on project name and then based on version. Only string comparisons are performed. 64 * @see java.lang.Comparable#compareTo(java.lang.Object) 65 */ 66 @Override 67 public int compareTo(SoftwareVersion o) { 68 int projectStrCmp = 0; 69 if( project!=null ) { 70 projectStrCmp = project.compareTo(o.project); 71 } 72 if( projectStrCmp==0 && version!=null ) { 73 return version.compareTo(o.version); 74 } else { 75 return projectStrCmp; 76 } 77 } 61 78 }
Note: See TracChangeset
for help on using the changeset viewer.