Class VersionImpl

  • All Implemented Interfaces:
    java.lang.Comparable , org.jitsi.utils.version.Version

    
    public class VersionImpl
     implements Version
                        

    An implementation of Version.

    Author:

    Emil Ivov

    Pawel Domas

    Boris Grozev

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionImpl(String applicationName, int majorVersion, int minorVersion) Creates version object with custom major, minor and nightly build id.
      VersionImpl(String applicationName, int majorVersion, int minorVersion, String nightlyBuildID) Creates version object with custom major, minor and nightly build id.
      VersionImpl(String applicationName, int majorVersion, int minorVersion, String nightlyBuildID, String preReleaseId) Creates version object with custom major, minor and nightly build id.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getApplicationName() Returns the name of the application that we're currently running.
      int getVersionMajor() Returns the version major of the current Jitsi version.
      int getVersionMinor() Returns the version minor of the current Jitsi version.
      String getNightlyBuildID() If this is a nightly build, returns the build identifies (e.g.
      boolean isNightly() Indicates if this Jitsi version corresponds to a nightly build of a repository snapshot or to an official Jitsi release.
      boolean isPreRelease() Indicates whether this version represents a prerelease (i.e.
      String getPreReleaseID() Returns the version prerelease ID of the current Jitsi version and null if this version is not a prerelease.
      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 Jitsi version and false otherwise.
      int hashCode()
      String toString() Returns a String representation of this Version instance in the generic form of major.minor[.nightly.build.id].
      • Methods inherited from class java.lang.Comparable

        compareTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VersionImpl

        VersionImpl(String applicationName, int majorVersion, int minorVersion)
        Creates version object with custom major, minor and nightly build id.
        Parameters:
        majorVersion - the major version to use.
        minorVersion - the minor version to use.
      • VersionImpl

        VersionImpl(String applicationName, int majorVersion, int minorVersion, String nightlyBuildID)
        Creates version object with custom major, minor and nightly build id.
        Parameters:
        majorVersion - the major version to use.
        minorVersion - the minor version to use.
        nightlyBuildID - the nightly build id value for new version object.
      • VersionImpl

        VersionImpl(String applicationName, int majorVersion, int minorVersion, String nightlyBuildID, String preReleaseId)
        Creates version object with custom major, minor and nightly build id.
        Parameters:
        majorVersion - the major version to use.
        minorVersion - the minor version to use.
        nightlyBuildID - the nightly build id value for new version object.
    • Method Detail

      • getApplicationName

         String getApplicationName()

        Returns the name of the application that we're currently running. Default MUST be Jitsi.

        Returns:

        the name of the application that we're currently running. Default MUST be Jitsi.

      • getVersionMajor

         int getVersionMajor()

        Returns the version major of the current Jitsi 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 Jitsi.

      • getVersionMinor

         int getVersionMinor()

        Returns the version minor of the current Jitsi 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 Jitsi version.

      • 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 Jitsi version, the method returns null.

      • isNightly

         boolean isNightly()

        Indicates if this Jitsi version corresponds to a nightly build of a repository snapshot or to an official Jitsi release.

      • isPreRelease

         boolean isPreRelease()

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

      • getPreReleaseID

         String getPreReleaseID()

        Returns the version prerelease ID of the current Jitsi version and null if this version is not a prerelease. Version pre-release id-s exist only for pre-releaseversions and are null otherwise. Note that pre-relesae versions are not used by Jitsi's current versioning convention

      • 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.

      • equals

         boolean equals(Object version)

        Compares the version parameter to this version and returns true if and only if both reference the same Jitsi version and false otherwise.

      • toString

         String toString()

        Returns a String representation of this Version instance in the generic form of major.minor[.nightly.build.id].

        Returns:

        a major.minor[.build] String containing the complete Jitsi version.