Class Tm1Version

java.lang.Object
io.skipcheck.tm1.client.version.Tm1Version
All Implemented Interfaces:
Comparable<Tm1Version>

public final class Tm1Version extends Object implements Comparable<Tm1Version>
A TM1 server version, as reported by Server.ProductVersion (read through Tm1Session.version()).

TM1 reports versions as dot-separated numbers, such as 11.8.03500.6. Each part is compared numerically, so 11.8.03500.6 equals 11.8.3500.6, and a shorter version is treated as if padded with zeros: 11.8 equals 11.8.0.0. toString() returns the text exactly as parsed, leading zeros included.

This is the TM1 server build number, not the Planning Analytics release number (such as 2.1.19) or the REST API schema version in $metadata (such as 11.8.35).

  • Method Details

    • parse

      public static Tm1Version parse(String text)
      Parses a version such as 11.8.03500.6. Surrounding whitespace is ignored.
      Parameters:
      text - the version text
      Returns:
      the version
      Throws:
      IllegalArgumentException - if the text isn't dot-separated numbers
    • isAtLeast

      public boolean isAtLeast(Tm1Version other)
      True if this version is the same as or newer than other.
      Parameters:
      other - the version to compare with
      Returns:
      true if this version is equal to or newer than other
    • isBefore

      public boolean isBefore(Tm1Version other)
      True if this version is older than other.
      Parameters:
      other - the version to compare with
      Returns:
      true if this version is older than other
    • compareTo

      public int compareTo(Tm1Version other)
      Specified by:
      compareTo in interface Comparable<Tm1Version>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      The version exactly as parsed, e.g. 11.8.03500.6.
      Overrides:
      toString in class Object