Class GerritVersionNumber

  • All Implemented Interfaces:
    Comparable<VersionNumber>
    Direct Known Subclasses:
    HighestVersionNumber

    public class GerritVersionNumber
    extends VersionNumber
    Subclass of VersionNumber which can account for gerrit snapshot versions.
    Author:
    Tomas Westling <thomas.westling@sonyericsson.com>
    • Constructor Detail

      • GerritVersionNumber

        public GerritVersionNumber​(String num)
        Parses a string like "1.0.2" into the version number.
        Parameters:
        num - the version string.
    • Method Detail

      • getGerritVersionNumber

        public static GerritVersionNumber getGerritVersionNumber​(String num)
        Returns a new GerritVersionNumber from a String. Sets the snapshot field to true if it finds a -g in the version String.
        Parameters:
        num - the version String.
        Returns:
        the GerritVersionNumber.
      • isSnapshot

        public boolean isSnapshot()
        Getter for if the version number is a snapshot.
        Returns:
        if it is a snapshot.