Class CdsVersion

java.lang.Object
com.sap.cds.reflect.impl.CdsVersion
All Implemented Interfaces:
Comparable<CdsVersion>

public final class CdsVersion extends Object implements Comparable<CdsVersion>
  • Constructor Summary

    Constructors
    Constructor
    Description
    CdsVersion(int major, int minor, int micro, int buildNumber)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
    Compares the compiler versions based on the normalized version which is calculated as major*10^p*3 + minor*10^p*2 + micro*10^p + buildNumber, where p - power, is the max precision length of the version segment.
    boolean
     
    int
     
    int
     
    int
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CdsVersion

      public CdsVersion(int major, int minor, int micro, int buildNumber)
  • Method Details

    • major

      public int major()
    • minor

      public int minor()
    • micro

      public int micro()
    • buildNumber

      public int buildNumber()
    • compareTo

      public int compareTo(CdsVersion other)
      Compares the compiler versions based on the normalized version which is calculated as major*10^p*3 + minor*10^p*2 + micro*10^p + buildNumber, where p - power, is the max precision length of the version segment.
      Specified by:
      compareTo in interface Comparable<CdsVersion>
      Parameters:
      other - the version to be compared
      Returns:
      a negative integer, zero, or a positive integer as this version is less than, equal to, or greater than the specified version
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object