public final class VersionNumber
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static VersionNumber |
VERSION_BIG
A convenient '999' version
|
static VersionNumber |
VERSION_ZERO
A convenient '0' version
|
| Constructor and Description |
|---|
VersionNumber(java.lang.String version)
Constructror, expects a valid version string.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final VersionNumber VERSION_ZERO
public static final VersionNumber VERSION_BIG
public VersionNumber(java.lang.String version)
version - the version stringpublic int[] getParts()
public int compareTo(VersionNumber obj)
compareTo in interface java.lang.Comparableobj - the other version numberpublic int getPart(int index)
index - the indexpublic 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.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.