public int compareTo()

in src/main/java/org/apache/maven/plugins/gpg/GpgVersion.java [60:75]


    public int compareTo(GpgVersion other) {
        final int[] thisSegments = versionSegments;
        final int[] otherSegments = other.versionSegments;

        int minSegments = Math.min(thisSegments.length, otherSegments.length);

        for (int index = 0; index < minSegments; index++) {
            int compareValue = Integer.compare(thisSegments[index], otherSegments[index]);

            if (compareValue != 0) {
                return compareValue;
            }
        }

        return (thisSegments.length - otherSegments.length);
    }