Class DefaultVersionComparator
java.lang.Object
com.github.aistomin.maven.browser.DefaultVersionComparator
- All Implemented Interfaces:
VersionComparator
public final class DefaultVersionComparator extends Object implements VersionComparator
The comparator that compares two standard numeric versions like 1.0.1
and 2.0.
- Since:
- 2.0
-
Constructor Summary
Constructors Constructor Description DefaultVersionComparator(MvnArtifactVersion one, MvnArtifactVersion two)
Ctor. -
Method Summary
Modifier and Type Method Description Boolean
isApplicable()
Is this comparator applicable for the provided versions.Boolean
isFirstBiggerThanSecond()
Check if the first version is bigger than the second one.
-
Constructor Details
-
DefaultVersionComparator
Ctor.- Parameters:
one
- The first version.two
- The second version.
-
-
Method Details
-
isFirstBiggerThanSecond
Description copied from interface:VersionComparator
Check if the first version is bigger than the second one.- Specified by:
isFirstBiggerThanSecond
in interfaceVersionComparator
- Returns:
- True - first version is bigger than the second. False - first version is smaller or equal than the second one.
-
isApplicable
Description copied from interface:VersionComparator
Is this comparator applicable for the provided versions.- Specified by:
isApplicable
in interfaceVersionComparator
- Returns:
- True - the comparator is applicable; False - the comparator is not applicable.
-