de.smartics.maven.issues.util
Class InverseVersionComparator

Package class diagram package InverseVersionComparator
java.lang.Object
  extended by de.smartics.maven.issues.util.InverseVersionComparator
All Implemented Interfaces:
Serializable, Comparator<org.apache.maven.artifact.versioning.ArtifactVersion>

public class InverseVersionComparator
     
     
extends Object
implements Comparator<org.apache.maven.artifact.versioning.ArtifactVersion>, Serializable

Inverts the natural order of the artifact version. Greater version numbers come first.

Author:
Robert Reiner
See Also:
Serialized Form

Field Summary
static InverseVersionComparator INSTANCE
          An instance for reuse.
 
Constructor Summary
InverseVersionComparator()
          Default constructor.
 
Method Summary
 int compare(org.apache.maven.artifact.versioning.ArtifactVersion o1, org.apache.maven.artifact.versioning.ArtifactVersion o2)
           Returns the inverse natural order of the artifact version.
 
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
 

Field Detail

INSTANCE

public static final InverseVersionComparator INSTANCE
An instance for reuse.

Constructor Detail

InverseVersionComparator

public InverseVersionComparator()
Default constructor.

Method Detail

compare

public int compare(org.apache.maven.artifact.versioning.ArtifactVersion o1,
                   org.apache.maven.artifact.versioning.ArtifactVersion o2)

Returns the inverse natural order of the artifact version.

Specified by:
compare in interface Comparator<org.apache.maven.artifact.versioning.ArtifactVersion>


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.