org.codehaus.mojo.versions.ordering
Interface VersionComparator

All Superinterfaces:
Comparator
All Known Implementing Classes:
AbstractVersionComparator, MavenVersionComparator, MercuryVersionComparator, NumericVersionComparator

public interface VersionComparator
extends Comparator

A rule for comparing and manipulating versions.


Method Summary
 int getSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion artifactVersion)
          Returns the number of segments specified or specifiable in the supplied artifact version.
 org.apache.maven.artifact.versioning.ArtifactVersion incrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion artifactVersion, int segment)
          Increment the specified segment of the supplied version.
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

getSegmentCount

int getSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion artifactVersion)
Returns the number of segments specified or specifiable in the supplied artifact version.

Parameters:
artifactVersion - The artifact version to count the segments of.
Returns:
The number of segments.
Since:
1.0-beta-1

incrementSegment

org.apache.maven.artifact.versioning.ArtifactVersion incrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion artifactVersion,
                                                                      int segment)
Increment the specified segment of the supplied version.

Parameters:
artifactVersion - The artifact version to increment.
segment - The segment number to increment.
Returns:
An artifact version with the specified segment incremented.
Since:
1.0-beta-1


Copyright © 2008-2011 Codehaus. All Rights Reserved.