Package com.soebes.itf.jupiter.extension
Class MavenVersionComparator
java.lang.Object
com.soebes.itf.jupiter.extension.MavenVersionComparator
- All Implemented Interfaces:
Comparable<MavenVersionComparator>
@API(status=INTERNAL,
since="0.13.0")
public final class MavenVersionComparator
extends Object
implements Comparable<MavenVersionComparator>
- Author:
- Karl Heinz Marbaise
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
int
major()
int
minor()
static MavenVersionComparator
of()
Define aMavenVersionComparator
which identifies any version to be equal to it.static MavenVersionComparator
of
(int major) Define aMavenVersionComparator
which identifies only the major version.static MavenVersionComparator
of
(int major, int minor) Define aMavenVersionComparator
which identifies only the major and minor version.static MavenVersionComparator
of
(int major, int minor, int patch) Define aMavenVersionComparator
which identifies only the major, minor and patch version.static MavenVersionComparator
Define aMavenVersionComparator
which identifies only the major, minor, patch, qualifier and qualifierNumber.int
patch()
int
toString()
-
Method Details
-
of
Define aMavenVersionComparator
which identifies any version to be equal to it.- Returns:
MavenVersionComparator
.
-
of
Define aMavenVersionComparator
which identifies only the major version. Example:3
. That means in consequence that the following version will be seen as equal:- 3 == 3.6.0
- 3 == 3.1.1
- 3 == 3.1.1-alpha-1
- Parameters:
major
- The major version.- Returns:
MavenVersionComparator
.
-
of
Define aMavenVersionComparator
which identifies only the major and minor version. Example:3.6
. That means in consequence that the following version will be seen as equal:- 3.6 == 3.6.0
- 3.6 == 3.6.15
- 3.6 == 3.6.15-alpha-2
- Parameters:
major
- The major version.minor
- The minor version.- Returns:
MavenVersionComparator
.
-
of
Define aMavenVersionComparator
which identifies only the major, minor and patch version. Example:3.6.1
.- Parameters:
major
- The major version.minor
- The minor version.patch
- The patch version.- Returns:
MavenVersionComparator
.
-
of
public static MavenVersionComparator of(int major, int minor, int patch, String qualifier, int qualifierNumber) Define aMavenVersionComparator
which identifies only the major, minor, patch, qualifier and qualifierNumber. Example:3.6.1-alpha-1
.- Parameters:
major
- The major version.minor
- The minor version.patch
- The patch version.qualifier
- The qualifier version.qualifierNumber
- The qualifierNumber version.- Returns:
MavenVersionComparator
.
-
major
public int major() -
minor
public int minor() -
patch
public int patch() -
qualifier
-
qualifierNumber
public int qualifierNumber() -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<MavenVersionComparator>
-