public class ReleaseVersion extends Object implements Comparable<ReleaseVersion>
[Major].[Minor].[Patch]
".
Instances are immutable, which makes them thread-safe.
The equals()
and hashCode()
methods have been overridden so that this class
will play nicely with the Collection framework (e.g. using instances as keys in maps).
This class implements the Comparable
interface so instances sort correctly.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ReleaseVersion o) |
boolean |
equals(Object o) |
int |
getMajor()
Returns the major component of the build version.
|
int |
getMinor()
Returns the minor component of the build version.
|
int |
getPatch()
Returns the patch component of the build version.
|
int |
hashCode() |
String |
toShortString()
Returns the release version as a string without the leading zero for the Major number.
|
String |
toString() |
static ReleaseVersion |
valueOf(BuildVersion bv)
Returns a release version wrapping the given build version.
|
public int getMajor()
public int getMinor()
public int getPatch()
public String toShortString()
public int compareTo(ReleaseVersion o)
compareTo
in interface Comparable<ReleaseVersion>
public static ReleaseVersion valueOf(BuildVersion bv)
bv
- the build versionCopyright © 2015. All Rights Reserved.