public class Version extends Object implements Comparable<Version>
Versioned.version()
.Modifier and Type | Field and Description |
---|---|
protected int |
_majorVersion |
protected int |
_minorVersion |
protected int |
_patchLevel |
protected String |
_snapshotInfo
Additional information for snapshot versions; null for non-snapshot
(release) versions.
|
Constructor and Description |
---|
Version(int major,
int minor,
int patchLevel,
String snapshotInfo) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version other) |
boolean |
equals(Object o) |
int |
getMajorVersion() |
int |
getMinorVersion() |
int |
getPatchLevel() |
int |
hashCode() |
boolean |
isSnapshot() |
boolean |
isUknownVersion() |
String |
toString() |
static Version |
unknownVersion()
Method returns canonical "not known" version, which is used as version
in cases where actual version information is not known (instead of null).
|
protected final int _majorVersion
protected final int _minorVersion
protected final int _patchLevel
protected final String _snapshotInfo
public Version(int major, int minor, int patchLevel, String snapshotInfo)
public static Version unknownVersion()
public boolean isUknownVersion()
public boolean isSnapshot()
public int getMajorVersion()
public int getMinorVersion()
public int getPatchLevel()
public int compareTo(Version other)
compareTo
in interface Comparable<Version>