Package nzilbb.util

Class SemanticVersionComparator

  • All Implemented Interfaces:
    Comparator<String>

    public class SemanticVersionComparator
    extends Object
    implements Comparator<String>
    Compares semantic version strings.
    Author:
    Robert Fromont robert@fromont.net.nz
    • Constructor Detail

      • SemanticVersionComparator

        public SemanticVersionComparator()
        Default constructor.
    • Method Detail

      • compare

        public int compare​(String version1,
                           String version2)
        Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
        Specified by:
        compare in interface Comparator<String>