com.sonyericsson.hudson.plugins.gerrit.trigger.version
Class GerritVersionNumber

java.lang.Object
  extended by hudson.util.VersionNumber
      extended by com.sonyericsson.hudson.plugins.gerrit.trigger.version.GerritVersionNumber
All Implemented Interfaces:
Comparable<hudson.util.VersionNumber>
Direct Known Subclasses:
HighestVersionNumber

public class GerritVersionNumber
extends hudson.util.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
GerritVersionNumber(String num)
          Parses a string like "1.0.2" into the version number.
 
Method Summary
static GerritVersionNumber getGerritVersionNumber(String num)
          Returns a new GerritVersionNumber from a String.
 boolean isSnapshot()
          Getter for if the version number is a snapshot.
 
Methods inherited from class hudson.util.VersionNumber
compareTo, digit, equals, hashCode, isNewerThan, isOlderThan, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.


Copyright © 2004-2013. All Rights Reserved.