Class SystemVersion

java.lang.Object
org.hisp.dhis.model.SystemVersion
All Implemented Interfaces:
Serializable

public class SystemVersion extends Object implements Serializable
See Also:
  • Constructor Details

    • SystemVersion

      public SystemVersion(String version)
      Constructor.
      Parameters:
      version - the version string.
  • Method Details

    • version

      public String version()
      Returns the version as a string.
      Returns:
      the version string.
    • of

      public static SystemVersion of(String version)
      Creates a SystemVersion from the given version string.
      Parameters:
      version - the version string.
      Returns:
      a SystemVersion.
    • isHigher

      public boolean isHigher(String version)
      Indicates whether this system version is higher than the given version.
      Parameters:
      version - the version to compare with.
      Returns:
      true if higher, false if not.
    • isHigherOrEqual

      public boolean isHigherOrEqual(String version)
      Indicates whether this system version is higher than or equal to the given version.
      Parameters:
      version - the version to compare with.
      Returns:
      true if higher or equal, false if not.
    • isEqual

      public boolean isEqual(String version)
      Indicates whether this system version is equal to the given version.
      Parameters:
      version - the version to compare with.
      Returns:
      true if equal, false if not.
    • isLowerOrEqual

      public boolean isLowerOrEqual(String version)
      Indicates whether this system version is lower than or equal to the given version.
      Parameters:
      version - the version to compare with.
      Returns:
      true if lower or equal, false if not.
    • isLower

      public boolean isLower(String version)
      Indicates whether this system version is lower than the given version.
      Parameters:
      version - the version to compare with.
      Returns:
      true if lower, false if not.