@Immutable public final class Version extends Object implements Comparable<Version>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version o) |
boolean |
equals(Object obj) |
String |
getBuild()
Returns the build metadata for this Version.
|
long |
getMajor()
Return the major component of this Version.
|
long |
getMinor()
Return the minor component of this Version.
|
long |
getPatch()
Return the patch component of this Version.
|
static Version |
getVersion(Class<?> clazz)
Return the
Version for clazz. |
int |
hashCode() |
static Version |
parse(String version)
Return the
Version described by version. |
String |
toString() |
public static Version getVersion(Class<?> clazz)
Version for clazz.clazz - the class whose version to retrieveVersionpublic static Version parse(String version)
Version described by version.version - the version stringVersionIllegalArgumentException - if the version cannot be parsedpublic int compareTo(Version o)
compareTo in interface Comparable<Version>public String getBuild()
public long getMajor()
public long getMinor()
public long getPatch()