add semver sorter

This commit is contained in:
Grahame Grieve 2024-01-17 22:32:29 +11:00
commit a3ffe348fb
1 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package org.hl7.fhir.utilities;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.StringJoiner;
@ -41,6 +42,15 @@ import org.hl7.fhir.utilities.VersionUtilities.SemVer;
public class VersionUtilities {
public static class SemVerSorter implements Comparator<String> {
@Override
public int compare(String s1, String s2) {
return compareVersions(s1, s2);
}
}
public static class SemVer {
private String major;
private String minor;