de.smartics.maven.util.project
Class ProjectComparator

Package class diagram package ProjectComparator
java.lang.Object
  extended by de.smartics.maven.util.project.ProjectComparator
All Implemented Interfaces:
Comparator< MavenProject>

public class ProjectComparator
     
     
extends Object
implements Comparator< MavenProject>

A simple implementation of a comparator that compares the groupId, then the artifactId, and finally the versions, lexicographically.

Author:
Robert Reiner
To Do:
do no compare versions lexicographically.

Constructor Summary
ProjectComparator()
           
 
Method Summary
 int compare(MavenProject project1, MavenProject project2)
           Compares the groupId, then the artifactId, and finally the versions, lexicographically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ProjectComparator

public ProjectComparator()
Method Detail

compare

public int compare(MavenProject project1,
                   MavenProject project2)

Compares the groupId, then the artifactId, and finally the versions, lexicographically.

Specified by:
compare in interface Comparator<MavenProject>


Copyright © 2006-2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.