|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.app.AppVersion
public class AppVersion
A product version in Aduna's version format (i.e. major.minor-modifier). Where major stands for the major version number of the release, minor is the minor version number, and modifier is a modifier for the release, e.g. beta1 or RC1. Combined, this results in versions like 2.0 and 4.1-beta1.
| Constructor Summary | |
|---|---|
AppVersion()
Construct an uninitialized AppVersion. |
|
AppVersion(int major,
int minor)
Creates a new major.minor version number, e.g. |
|
AppVersion(int major,
int minor,
int micro)
Creates a new major.minor.micro version number, e.g. |
|
AppVersion(int major,
int minor,
int micro,
String modifier)
Creates a new major.minor.micro-modifier version number, e.g. |
|
AppVersion(int major,
int minor,
String modifier)
Creates a new major.minor-modifier version number, e.g. |
|
| Method Summary | |
|---|---|
int |
compareTo(AppVersion other)
Compares two version numbers according to their major, minor and micro version numbers, ordering from oldest to newests version. |
boolean |
equals(Object other)
|
int |
getMajor()
Gets the version's major version number. |
int |
getMicro()
Gets the version's micro version number. |
int |
getMinor()
Gets the version's minor version number. |
String |
getModifier()
Gets the version's release modifier part. |
int |
hashCode()
|
boolean |
newerThan(AppVersion other)
Checks if this version is newer than the specified version, according to the result of compareTo(AppVersion). |
boolean |
olderThan(AppVersion other)
Checks if this version is older than the specified version, according to the result of compareTo(AppVersion). |
static AppVersion |
parse(String versionString)
Parses a version string into a Version object. |
void |
setMajor(int major)
|
void |
setMicro(int micro)
|
void |
setMinor(int minor)
|
void |
setModifier(String modifier)
|
String |
toString()
Returns the string represention of this version. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AppVersion()
public AppVersion(int major,
int minor)
public AppVersion(int major,
int minor,
int micro)
public AppVersion(int major,
int minor,
String modifier)
public AppVersion(int major,
int minor,
int micro,
String modifier)
| Method Detail |
|---|
public int getMajor()
public void setMajor(int major)
public int getMinor()
public void setMinor(int minor)
public int getMicro()
public void setMicro(int micro)
public String getModifier()
public void setModifier(String modifier)
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean olderThan(AppVersion other)
compareTo(AppVersion).
public boolean newerThan(AppVersion other)
compareTo(AppVersion).
public int compareTo(AppVersion other)
compareTo in interface Comparable<AppVersion>public static AppVersion parse(String versionString)
versionString - A version string, e.g. 1.0.1 or 1.0-beta1.
NumberFormatException - If versionString could not be parsed to a version.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||