Class RuntimeVersion

  • All Implemented Interfaces:
    java.lang.Comparable<RuntimeVersion>

    public class RuntimeVersion
    extends java.lang.Object
    implements java.lang.Comparable<RuntimeVersion>
    Represents the version of the runtime server.
    • Constructor Summary

      Constructors 
      Constructor Description
      RuntimeVersion​(java.lang.String... versionNumber)
      Creates a runtime version with the specified version parts.
    • Constructor Detail

      • RuntimeVersion

        public RuntimeVersion​(java.lang.String... versionNumber)
        Creates a runtime version with the specified version parts.
        Parameters:
        versionNumber - the parts of the version number, from most significant to least significant
    • Method Detail

      • getImplementationVersion

        public static java.lang.String getImplementationVersion()
        Returns the implementation version of the runtime server.
        Returns:
        the implementation version
      • getSpecificationVersion

        public static java.lang.String getSpecificationVersion()
        Returns the specification version of the runtime server.
        Returns:
        the specification version
      • parse

        public static RuntimeVersion parse​(java.lang.String version)
        Parses a runtime version from the specified version string. The version parts must be separated by dots.
        Parameters:
        version - the string to parse
        Returns:
        the parsed result, or null if version was null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(RuntimeVersion other)
        Compares this object with the specified object for order.

        Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Specified by:
        compareTo in interface java.lang.Comparable<RuntimeVersion>
        Parameters:
        other - the version to compare to
        See Also:
        Comparable.compareTo(java.lang.Object)
      • getInstance

        public static RuntimeVersion getInstance()
        Returns the current runtime version.
        Returns:
        the version of the current runtime server