public final class

VersionNumber

extends Object
implements Comparable<T>
java.lang.Object
   ↳ com.atlassian.jira.util.system.VersionNumber

Class Overview

Version Number holder. Implementation from the Mylyn JIRA Connector project. Added isGreaterThan etc. convenience methods.

Doesn't handle things like 3.3rc1 (will actually parse as 3.31 which will be > 3.3)

Summary

Public Constructors
VersionNumber(String version)
VersionNumber(String version, String splitterRegex)
Public Methods
int compareTo(VersionNumber versionNumber)
boolean equals(Object that)
String getOSGIVersion()
Returns this version formatted as a valid OSGI version.
int hashCode()
boolean isGreaterThan(VersionNumber v)
boolean isGreaterThanOrEquals(VersionNumber v)
boolean isLessThan(VersionNumber v)
boolean isLessThanOrEquals(VersionNumber v)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

public VersionNumber (String version)

public VersionNumber (String version, String splitterRegex)

Public Methods

public int compareTo (VersionNumber versionNumber)

public boolean equals (Object that)

public String getOSGIVersion ()

Returns this version formatted as a valid OSGI version.

Returns
  • A valid OSGI version string.
See Also
  • http://www.osgi.org/javadoc/r4v41/org/osgi/framework/Version.html

public int hashCode ()

public boolean isGreaterThan (VersionNumber v)

public boolean isGreaterThanOrEquals (VersionNumber v)

public boolean isLessThan (VersionNumber v)

public boolean isLessThanOrEquals (VersionNumber v)

public String toString ()