Package org.wildfly.channel.version
Interface VersionMatcher
-
- All Known Implementing Classes:
FixedVersionMatcher,VersionPatternMatcher
public interface VersionMatcherUtility class to determine tle latest version among a set of versions. The#COMPARATORprovides the implementation to compare the versions. The latest one is the "last" determine by this comparator. This comparator first compares the epoch of the versions ([epoch:]version). If present, the epoch MUST be an integer. This comparator will split the versions (using non-digit characters such as ".") to determine their digits and compare them numerically. The comparator will determine that "1.0.10" is later than "1.0.2" (because 10 > 2). If the versions contains characters, they are sorted in their lexical order. The comparator will determine that "1.0.0.RC1" is later than "1.0.0.Final" (because "RC1" is after "Final").
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<String>COMPARATORCopied from https://raw.githubusercontent.com/wolfc/updepres/master/model/src/main/java/org/jboss/up/depres/version/VersionComparator.java FIXME: proper attribution
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Optional<String>getLatestVersion(Set<String> versions)Determine the latest version among the parameters based on theCOMPARATOR.Optional<String>matches(Set<String> samples)
-
-
-
Field Detail
-
COMPARATOR
static final Comparator<String> COMPARATOR
Copied from https://raw.githubusercontent.com/wolfc/updepres/master/model/src/main/java/org/jboss/up/depres/version/VersionComparator.java FIXME: proper attribution
-
-
Method Detail
-
getLatestVersion
static Optional<String> getLatestVersion(Set<String> versions)
Determine the latest version among the parameters based on theCOMPARATOR.- Parameters:
versions- a Set of versions- Returns:
- an Optional of the latest version.
-
-