Class VersionComparator
java.lang.Object
org.inventivetalent.update.spiget.comparator.VersionComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VersionComparatorCompares versions by checking if the version strings are equalstatic final VersionComparatorCompares versions by their Sematic Version (Major.Minor.Patch, semver.org).static final VersionComparatorSame asSEM_VER, but supports version names with '-SNAPSHOT' suffixes -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EQUAL
Compares versions by checking if the version strings are equal -
SEM_VER
Compares versions by their Sematic Version (Major.Minor.Patch, semver.org). Removes dots and compares the resulting Integer values -
SEM_VER_SNAPSHOT
Same asSEM_VER, but supports version names with '-SNAPSHOT' suffixes
-
-
Constructor Details
-
VersionComparator
public VersionComparator()
-
-
Method Details
-
isNewer
Called to check if a version is newer- Parameters:
currentVersion- Current version of the plugincheckVersion- Version to check- Returns:
trueif the checked version is newer
-