|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.util.VersionNumber
As the name implies the VersionNumber class represents a version
number and follows the rules of the most commonly used numeric software
versioning scheme. This scheme expresses a version number as a concatenation
of four single numbers seperated by periods. So the structure of a version
number looks like:
Version.Subversion.Revision.BuildThe following table explains the meaning of each of the single numbers.
| Number | Description |
| Version |
The major version number.
This number is normally increased when significant changes or jumps in funtionality have taken place. |
| Subversion |
The minor version number.
This number is increased when minor changes to functionality have been applied. |
| Revision |
The number for the revision. Sometimes it is also called the service pack.
This number is increased for releases due to major bug fix or the like. |
| Build |
The number of the build.
This number is increased for internal releases due to minor bug fixes or the like. |
An instance of this class can be created either by giving each of the single numbers or by giving the complete version number in its string representation.
* * *
Instances of VersionNumber can be compared to each other. The
methods provided to support comparison are listed below.
boolean lessOrEqual(String)boolean lessOrEqual(VersionNumber)
VersionInfo| Constructor Summary | |
VersionNumber(int version,
int subversion,
int revision,
int build)
Constructor with each single number. |
|
VersionNumber(java.lang.String completeVersionNumber)
Constructor with given version number in its string representation. |
|
| Method Summary | |
int |
getBuild()
Returns the build of the version number |
int |
getRevision()
Return the revision of the version number. |
int |
getServicepack()
Deprecated. make use of getRevision() instead |
int |
getSubversion()
Returns the minor version number |
int |
getVersion()
Returns the major version number. |
boolean |
lessOrEqual(java.lang.String completeVersionNumber)
Compares this instance of VersionNumber against the given
version number and returns a boolean that indicates whether
the given version number is less, equal or higher than this instance of
VersionNumber. |
boolean |
lessOrEqual(VersionNumber other)
Compares this instance of VersionNumber against the given
instance of VersionNumber and returns a boolean
that indicates whether the given instance is less, equal or higher than
this instance of VersionNumber. |
java.lang.String |
toString()
Returns the string representation of this instance of VersionNumber. |
java.lang.String |
toStringLong()
Returns a long string representation of this instance of VersionNumber. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public VersionNumber(int version,
int subversion,
int revision,
int build)
version - the major version numbersubversion - the minor version numberrevision - the servicepack of the version numberbuild - the build of the version number
public VersionNumber(java.lang.String completeVersionNumber)
throws VersionNumberParseException
completeVersionNumber - the complete version number in its
string representation
VersionNumberParseException - is thrown when the given
string representation is malformed| Method Detail |
public final int getVersion()
public final int getSubversion()
public final int getRevision()
public final int getServicepack()
getRevision() instead
public final int getBuild()
public boolean lessOrEqual(java.lang.String completeVersionNumber)
throws VersionNumberParseException
VersionNumber against the given
version number and returns a boolean that indicates whether
the given version number is less, equal or higher than this instance of
VersionNumber. Whereas a return value of true
indicates that this instance is less than or equal to the given version
number.
completeVersionNumber - the version number to compare to
VersionNumberParseException - is thrown in case the given
String represetation is malformedpublic boolean lessOrEqual(VersionNumber other)
VersionNumber against the given
instance of VersionNumber and returns a boolean
that indicates whether the given instance is less, equal or higher than
this instance of VersionNumber. Whereas a return value of
true indicates that this instance is less than or equal to
the given instance.
other - the VersionNumber instance to compare to
public java.lang.String toString()
VersionNumber.
public java.lang.String toStringLong()
VersionNumber.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||