Package me.croabeast.common.updater
Interface VersionScheme
public interface VersionScheme
Interface defining a strategy to compare two version strings and return
the "greater" (more recent) of the two, or
null if comparison
is not possible under the scheme.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VersionSchemeA simple decimal-based version scheme: splits on dots and compares each numeric segment. -
Method Summary
-
Field Details
-
DECIMAL_SCHEME
A simple decimal-based version scheme: splits on dots and compares each numeric segment. If one array is longer, that version is considered newer.
-
-
Method Details
-
compare
Compares two version identifiers according to a custom scheme.- Parameters:
first- the currently installed version (non-null)second- the remote/latest version to compare against (non-null)- Returns:
- the version string representing the newer version,
or
nullif the scheme cannot compare the inputs
-