package com.metacodestudio.hotsuploader.versions;

public class ReleaseComparator {
}

@@ -44,16 +44,46 @@
 sions;%0A%0A
+import java.util.Comparator;%0A%0A
 public c
@@ -109,8 +109,671 @@
 tor 
-%7B
+implements Comparator%3CGitHubRelease%3E %7B%0A%0A    public int compare(final GitHubRelease release1, final GitHubRelease release2) %7B%0A        if (release1.isPrerelease() && !release2.isPrerelease()) %7B%0A            return 1;%0A        %7D else if (!release1.isPrerelease() && release2.isPrerelease()) %7B%0A            return -1;%0A        %7D%0A%0A        double release1Version = stripVersion(release1.getTagName());%0A        double release2Version = stripVersion(release2.getTagName());%0A%0A        return Double.compare(release1Version, release2Version);%0A    %7D%0A%0A    private double stripVersion(final String tagName) %7B%0A        return Double.parseDouble(tagName.replaceAll(%22-%5C%5Cw*%22, %22%22));%0A    %7D
 %0A%7D%0A

create comparator for githubrelease