Class GerritVersionNumber
- java.lang.Object
-
- hudson.util.VersionNumber
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.version.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>
-
-
Field Summary
-
Fields inherited from class hudson.util.VersionNumber
DESCENDING
-
-
Constructor Summary
Constructors Constructor Description GerritVersionNumber(String num)
Parses a string like "1.0.2" into the version number.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static GerritVersionNumber
getGerritVersionNumber(String num)
Returns a new GerritVersionNumber from a String.int
hashCode()
boolean
isSnapshot()
Getter for if the version number is a snapshot.-
Methods inherited from class hudson.util.VersionNumber
compareTo, digit, getDigitAt, isNewerThan, isNewerThanOrEqualTo, isOlderThan, isOlderThanOrEqualTo, toString
-
-
-
-
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.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classVersionNumber
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classVersionNumber
-
isSnapshot
public boolean isSnapshot()
Getter for if the version number is a snapshot.- Returns:
- if it is a snapshot.
-
-