public abstract class Version extends Object implements Comparable<Version>, Cloneable
Version
Version classes must have this class as their parent| Constructor and Description |
|---|
Version()
Creates a new
Version with the default VersionType of STABLE |
Version(VersionType type)
Creates a new
Version |
Version(VersionType type,
String codeName)
Creates a new
Version |
| Modifier and Type | Method and Description |
|---|---|
abstract Version |
clone()
Clones this
Version |
boolean |
equals(Object obj)
|
static Version |
get(String versionAsString)
|
String |
getCodeName()
Gets the code name of this
Version |
VersionType |
getType()
Gets this
Version's VersionType |
abstract int |
hashCode()
Gets this
Version's hashcode |
void |
setCodeName(String codeName)
Sets the code name of this
Version |
void |
setType(VersionType type)
Sets this
Version's VersionType |
abstract GenericVersion |
toGenericVersion()
Converts this
Version to a GenericVersion |
abstract String |
toString()
|
finalize, getClass, notify, notifyAll, wait, wait, waitcompareTopublic Version()
Version with the default VersionType of STABLEpublic Version(VersionType type)
Versiontype - The VersionType to usepublic Version(VersionType type, String codeName)
Versiontype - The VersionType to usecodeName - The code name to usepublic final VersionType getType()
Version's VersionTypeVersionTypepublic final void setType(VersionType type)
Version's VersionTypetype - The VersionType to setpublic final String getCodeName()
Versionpublic final void setCodeName(String codeName)
VersioncodeName - The code namepublic abstract GenericVersion toGenericVersion()
Version to a GenericVersionGenericVersion representing this Versionpublic abstract String toString()
public final boolean equals(Object obj)
public abstract int hashCode()
Version's hashcodepublic static Version get(String versionAsString) throws InvalidVersionException, IllegalArgumentException, NumberFormatException
versionAsString - The Version as a StringVersionInvalidVersionException - The Version could not be decodedIllegalArgumentException - The VersionType could not be decodedNumberFormatException - There was an invalid Version number (!3, for example, instead of 13)Copyright © 2012 Massive Dynamics. All Rights Reserved.