Interface VersionComparator
public interface VersionComparator
Compares plugin version strings, so the update check can tell a newer release from an older one.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisOlderThan(String first, String second) Whether one version predates another.booleanisOlderThan(String first, String second, boolean checkSnapshot) Whether one version predates another, optionally treating a snapshot as older than the release it leads to.booleanisSnapshot(String version) Whether a version is a snapshot rather than a release.
-
Method Details
-
isSnapshot
Whether a version is a snapshot rather than a release.- Parameters:
version- the version- Returns:
- true if it is a snapshot
-
isOlderThan
-
isOlderThan
Whether one version predates another, optionally treating a snapshot as older than the release it leads to.- Parameters:
first- the version to testsecond- the version to compare againstcheckSnapshot- whether the snapshot marker is taken into account- Returns:
- true if the first is older
-