Interface VersionComparator
- All Known Implementing Classes:
DefaultVersionComparator
,OldStyleVersionComparator
public interface VersionComparator
The interface of the classes that compare two versions.
- Since:
- 2.0
-
Method Summary
Modifier and Type Method Description static VersionComparator
comparator(MvnArtifactVersion first, MvnArtifactVersion second)
Get an appropriate comparator of the two provided versions.Boolean
isApplicable()
Is this comparator applicable for the provided versions.Boolean
isFirstBiggerThanSecond()
Check if the first version is bigger than the second one.
-
Method Details
-
isFirstBiggerThanSecond
Boolean isFirstBiggerThanSecond()Check if the first version is bigger than the second one.- Returns:
- True - first version is bigger than the second. False - first version is smaller or equal than the second one.
-
isApplicable
Boolean isApplicable()Is this comparator applicable for the provided versions.- Returns:
- True - the comparator is applicable; False - the comparator is not applicable.
-
comparator
Get an appropriate comparator of the two provided versions.- Parameters:
first
- Version A.second
- Version B.- Returns:
- The proper comparator.
-