|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.common.Version
public class Version
The Version
class is the class that is used throughout the Application Runtime Expert
to represent the version of various resources. This class is used to represent the version of the ARE Core,
individual plugins, a deployment template, and other resources.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
Constructor Summary | |
---|---|
Version(int major)
Constructs a Version object with the major version set to the input value. |
|
Version(int major,
int minor)
Constructs a Version object with the major and minor versions set to the input values. |
|
Version(int major,
int minor,
int revision)
Constructs a Version object with the major, minor, and revision versions set to the input values. |
|
Version(Version versionToCopy)
Copy constructor. |
Method Summary | |
---|---|
protected java.lang.Object |
clone()
Creates and returns a clone of the Version object |
int |
compareTo(java.lang.Object obj)
Compares two Version objects to see if they are equal. |
boolean |
equals(java.lang.Object obj)
Comparison method that determines if two Version objects represent
the exact same version. |
int |
getMajor()
Retrieves the major version number |
int |
getMinor()
Retrieves the minor version number |
int |
getRevision()
Retrieves the revision version number |
boolean |
isEqualOrNewerThan(Version version)
Check whether this version is newer than or equal to the input version object. |
static Version |
parse(java.lang.String versionToParse)
Parses the input String, pulling out the major, minor (if present), and revision (if present) levels. |
void |
setMajor(int major)
Sets the major version number to the specified value |
void |
setMinor(int minor)
Sets the minor version number to the specified value |
void |
setRevision(int revision)
Sets the revision version number to the specified value |
java.lang.String |
toString()
Builds and returns a String representation of the Version object |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public Version(Version versionToCopy)
Version
object that
has the exact same major, minor, and revision values as the input Version
object.
versionToCopy
- The Version
to copy.public Version(int major)
Version
object with the major version set to the input value.
major
- The major version to assign to the new object.public Version(int major, int minor)
Version
object with the major and minor versions set to the input values.
major
- The major version to assign to the new object.minor
- The minor version to assign to the new object.public Version(int major, int minor, int revision)
Version
object with the major, minor, and revision versions set to the input values.
major
- The major version to assign to the new object.minor
- The minor version to assign to the new object.revision
- The revision version to assign to the new object.Method Detail |
---|
public static Version parse(java.lang.String versionToParse)
versionToParse
- The version String to parse
Version
object that represents the input version String
java.lang.IllegalArgumentException
- If the input String is not in a valid version String formatpublic int getMajor()
public void setMajor(int major)
major
- The value to set the major version number topublic int getMinor()
public void setMinor(int minor)
minor
- The value to set the minor version number topublic int getRevision()
public void setRevision(int revision)
revision
- The value to set the revision version number topublic java.lang.String toString()
Version
object
toString
in class java.lang.Object
Version
objectpublic boolean equals(java.lang.Object obj)
Version
objects represent
the exact same version.
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj)
Version
objects to see if they are equal.
compareTo
in interface java.lang.Comparable
Version
object is less than the input object0 if the two objects represent the exact same version
1 if the Version
object is greater than the input object
GenericAreException
- If the input object is not an instance of the Version
class.public boolean isEqualOrNewerThan(Version version)
version
- the object to compare to
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
Version
object
clone
in class java.lang.Object
Version
object
java.lang.CloneNotSupportedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |