|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.util.VersionNumber
public final class VersionNumber
Immutable class to encapsulate a version number string. A valid version number string can be made up of any number of numberical parts all delimited by '.'.
| Field Summary | |
|---|---|
static VersionNumber |
VERSION_BIG
A convenient '999' version |
static VersionNumber |
VERSION_ZERO
A convenient '0' version |
| Constructor Summary | |
|---|---|
VersionNumber(java.lang.String version)
Constructror, expects a valid version string. |
|
| Method Summary | |
|---|---|
int |
compareTo(VersionNumber obj)
Compares the passed version to this. |
boolean |
equals(java.lang.Object obj)
Equals implementation |
int |
getPart(int index)
Helper method to the the part based on the index, if an invalid index is supplied 0 is returned. |
int[] |
getParts()
Get the various parts of the version |
int |
hashCode()
Hash code implementation |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final VersionNumber VERSION_ZERO
public static final VersionNumber VERSION_BIG
| Constructor Detail |
|---|
public VersionNumber(java.lang.String version)
version - the version string| Method Detail |
|---|
public int[] getParts()
public int compareTo(VersionNumber obj)
compareTo in interface java.lang.Comparableobj - the other version number
public int getPart(int index)
index - the index
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||