Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.version
Interface Version

All Superinterfaces:
Comparable<Version>

public interface Version
extends Comparable<Version>

Contains version information of the SIP Communicator instance that we're currently running.

Author:
Emil Ivov

Method Summary
 int compareTo(Version version)
          Compares another Version object to this one and returns a negative, zero or a positive integer if this version instance represents respectively an earlier, same, or later version as the one indicated by the version parameter.
 boolean equals(Object version)
          Compares the version parameter to this version and returns true if and only if both reference the same SIP Communicator version and false otherwise.
 String getApplicationName()
          Returns the name of the application that we're currently running.
 String getNightlyBuildID()
          If this is a nightly build, returns the build identifies (e.g.
 String getPreReleaseID()
          Returns the version prerelease ID of the current SIP Communicator version and null if this version is not a prerelease.
 int getVersionMajor()
          Returns the version major of the current SIP Communicator version.
 int getVersionMinor()
          Returns the version minor of the current SIP Communicator version.
 int getVersionRevision()
          Returns the version revision number of the current SIP Communicator version.
 boolean isNightly()
          Indicates if this SIP Communicator version corresponds to a nightly build of a repository snapshot or to an official SIP Communicator release.
 boolean isPreRelease()
          Indicates whether this version represents a prerelease (i.e.
 String toString()
          Returns a String representation of this Version instance.
 

Method Detail

getVersionMajor

int getVersionMajor()
Returns the version major of the current SIP Communicator version. In an example 2.3.1 version string 2 is the version major. The version major number changes when a relatively extensive set of new features and possibly rearchitecturing have been applied to the SIP Communicator.

Returns:
the version major integer.

getVersionMinor

int getVersionMinor()
Returns the version minor of the current SIP Communicator version. In an example 2.3.1 version string 3 is the version minor. The version minor number changes after adding enhancements and possibly new features to a given SIP Communicator version.

Returns:
the version minor integer.

getVersionRevision

int getVersionRevision()
Returns the version revision number of the current SIP Communicator version. In an example 2.3.1 version string 1 is the revision number. The version revision number number changes after applying bug fixes and possible some small enhancements to a given SIP Communicator version.

Returns:
the version revision number.

isNightly

boolean isNightly()
Indicates if this SIP Communicator version corresponds to a nightly build of a repository snapshot or to an official SIP Communicator release.

Returns:
true if this is a build of a nightly repository snapshot and false if this is an official SIP Communicator release.

getNightlyBuildID

String getNightlyBuildID()
If this is a nightly build, returns the build identifies (e.g. nightly-2007.12.07-06.45.17). If this is not a nightly build SIP Communicator version, the method returns null.

Returns:
a String containing a nightly build identifier or null if

isPreRelease

boolean isPreRelease()
Indicates whether this version represents a prerelease (i.e. a non-complete release like an alpha, beta or release candidate version).

Returns:
true if this version represents a prerelease and false otherwise.

getPreReleaseID

String getPreReleaseID()
Returns the version prerelease ID of the current SIP Communicator version and null if this version is not a prerelease. Version pre-release id-s and version revisions are exclusive, so in case this version is a pre- release the revision will bereturn null

Returns:
a String containing the version prerelease ID.

compareTo

int compareTo(Version version)
Compares another Version object to this one and returns a negative, zero or a positive integer if this version instance represents respectively an earlier, same, or later version as the one indicated by the version parameter.

Specified by:
compareTo in interface Comparable<Version>
Parameters:
version - the Version instance that we'd like to compare to this one.
Returns:
a negative integer, zero, or a positive integer as this object represents a version that is earlier, same, or more recent than the one referenced by the version parameter.

equals

boolean equals(Object version)
Compares the version parameter to this version and returns true if and only if both reference the same SIP Communicator version and false otherwise.

Overrides:
equals in class Object
Parameters:
version - the version instance that we'd like to compare with this one.
Returns:
true if and only the version param references the same SIP Communicator version as this Version instance and false otherwise.

getApplicationName

String getApplicationName()
Returns the name of the application that we're currently running. Default MUST be SIP Communicator.

Returns:
the name of the application that we're currently running. Default MUST be SIP Communicator.

toString

String toString()
Returns a String representation of this Version instance. If you'd just like to obtain the version of SIP Communicator so that you could display it (e.g. in a Help->About dialog) then all you need is calling this method.

Overrides:
toString in class Object
Returns:
a major.minor.revision[.build] String containing the complete SIP Communicator version.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.