|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.mojo.versions.ordering.AbstractVersionComparator
public abstract class AbstractVersionComparator
Base class for version comparators.
Constructor Summary | |
---|---|
AbstractVersionComparator()
|
Method Summary | |
---|---|
abstract int |
compare(Object o1,
Object o2)
|
boolean |
equals(Object obj)
Returns true if this object is the same type of comparator as the parameter. |
int |
getSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion v)
Returns the number of segments specified or specifiable in the supplied artifact version. |
int |
hashCode()
Returns a hash code value for the comparator class. |
org.apache.maven.artifact.versioning.ArtifactVersion |
incrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion v,
int segment)
Increment the specified segment of the supplied version. |
protected abstract int |
innerGetSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion v)
|
protected abstract org.apache.maven.artifact.versioning.ArtifactVersion |
innerIncrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion v,
int segment)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractVersionComparator()
Method Detail |
---|
public abstract int compare(Object o1, Object o2)
compare
in interface Comparator
public final int getSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion v)
getSegmentCount
in interface VersionComparator
v
- The artifact version to count the segments of.
protected abstract int innerGetSegmentCount(org.apache.maven.artifact.versioning.ArtifactVersion v)
public final org.apache.maven.artifact.versioning.ArtifactVersion incrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion v, int segment)
incrementSegment
in interface VersionComparator
v
- The artifact version to increment.segment
- The segment number to increment.
protected abstract org.apache.maven.artifact.versioning.ArtifactVersion innerIncrementSegment(org.apache.maven.artifact.versioning.ArtifactVersion v, int segment)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface Comparator
equals
in class Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.hashCode()
,
Hashtable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |