Skip to main content
Package com.gpudb

Class GPUdbBase.GPUdbVersion

java.lang.Object
com.gpudb.GPUdbBase.GPUdbVersion
Enclosing class:

public static final class GPUdbBase.GPUdbVersion extends Object
Contains the version of the client API or the GPUdb server. Has helper methods to compare with other versions.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GPUdbVersion(int major, int minor, int revision, int abiVersion)
    Creates a GPUdbBase.GPUdbVersion with a 4-component version number.
    GPUdbVersion(int major, int minor, int revision, int abiVersion, long build)
    Creates a GPUdbBase.GPUdbVersion with a 5-component version number.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
    Compare this version to the one represented by the five given version components.
    int
    Compare this version to the given version.
    boolean
     
    int
    Gets the ABI version (fourth) component of the version.
    long
    Gets the build number (fifth) component of the version.
    Get the full five-component version.
    int
    Gets the major (first) component of the version.
    int
    Gets the minor (second) component of the version.
    int
    Gets the revision (third) component of the version.
    Get the four-component version.
    int
     
    boolean
    isEqualTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
    Determine whether this version is equal to the one represented by the four given version components.
    boolean
    isEqualTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
    Determine whether this version is equal to the one represented by the five given version components.
    boolean
    Determine whether this version is equal to the given version.
    boolean
    isNewerThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
    Determine whether this version is newer than the one represented by the four given version components (not equal to).
    boolean
    isNewerThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
    Determine whether this version is newer than the one represented by the five given version components (not equal to).
    boolean
    Determine whether this version is newer than the given version (not equal to).
    boolean
    isOlderThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
    Determine whether this version is older than the one represented by the four given version components (not equal to).
    boolean
    isOlderThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
    Determine whether this version is older than the one represented by the five given version components (not equal to).
    boolean
    Determine whether this version is older than the given version (not equal to).
     

    Methods inherited from class java.lang.Object

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

    • GPUdbVersion

      public GPUdbVersion(int major, int minor, int revision, int abiVersion)
      Creates a GPUdbBase.GPUdbVersion with a 4-component version number. The build number for this version will be 0.
      Parameters:
      major - Major component of this version
      minor - Minor component of this version
      revision - Revision component of this version
      abiVersion - ABI version component of this version
    • GPUdbVersion

      public GPUdbVersion(int major, int minor, int revision, int abiVersion, long build)
      Creates a GPUdbBase.GPUdbVersion with a 5-component version number.
      Parameters:
      major - Major component of this version
      minor - Minor component of this version
      revision - Revision component of this version
      abiVersion - ABI version component of this version
      build - Build number component of this version
  • Method Details

    • getMajor

      public int getMajor()
      Gets the major (first) component of the version.
      Returns:
      the ‘major’ component value
    • getMinor

      public int getMinor()
      Gets the minor (second) component of the version.
      Returns:
      the ‘minor’ component value
    • getRevision

      public int getRevision()
      Gets the revision (third) component of the version.
      Returns:
      the ‘revision’ component value
    • getAbiVersion

      public int getAbiVersion()
      Gets the ABI version (fourth) component of the version.
      Returns:
      the ‘ABI version’ component value
    • getBuild

      public long getBuild()
      Gets the build number (fifth) component of the version.
      Returns:
      the ‘build’ component value; 0 if this version wasn’t created with a build number component
    • getVersion

      public String getVersion()
      Get the four-component version.
           major.minor.revision.abiVersion
       
      Returns:
      the four-component version number as a String.
    • getFullVersion

      public String getFullVersion()
      Get the full five-component version. For versions created with four components, the build number will be 0. Either:
           major.minor.revision.abiVersion.0
       
      or
           major.minor.revision.abiVersion.buildNumber
       
      Returns:
      the five-component version number as a String.
    • compareTo

      public int compareTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
      Compare this version to the one represented by the five given version components.
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      otherBuild - Build number component of the version to compare to
      Returns:
      -1 if this version is less than the one with the specified components, 1 if this version is greater, and 0 if equal.
    • compareTo

      public int compareTo(GPUdbBase.GPUdbVersion otherVersion)
      Compare this version to the given version.
      Parameters:
      otherVersion - GPUdbBase.GPUdbVersion to compare this one to
      Returns:
      -1 if this version is less than the given one, 1 if this version is greater, and 0 if they’re equal.
    • isNewerThan

      public boolean isNewerThan(GPUdbBase.GPUdbVersion otherVersion)
      Determine whether this version is newer than the given version (not equal to).
      Parameters:
      otherVersion - GPUdbBase.GPUdbVersion to compare this one to
      Returns:
      true if this version is newer than the given one.
    • isNewerThan

      public boolean isNewerThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
      Determine whether this version is newer than the one represented by the four given version components (not equal to).
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      Returns:
      true if this version is newer than the one with the given components.
    • isNewerThan

      public boolean isNewerThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
      Determine whether this version is newer than the one represented by the five given version components (not equal to).
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      otherBuild - Build number component of the version to compare to
      Returns:
      true if this version is newer than the one with the given components.
    • isOlderThan

      public boolean isOlderThan(GPUdbBase.GPUdbVersion otherVersion)
      Determine whether this version is older than the given version (not equal to).
      Parameters:
      otherVersion - GPUdbBase.GPUdbVersion to compare this one to
      Returns:
      true if this version is older than the given one.
    • isOlderThan

      public boolean isOlderThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
      Determine whether this version is older than the one represented by the four given version components (not equal to).
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      Returns:
      true if this version is older than the one with the given components.
    • isOlderThan

      public boolean isOlderThan(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
      Determine whether this version is older than the one represented by the five given version components (not equal to).
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      otherBuild - Build number component of the version to compare to
      Returns:
      true if this version is older than the one with the given components.
    • isEqualTo

      public boolean isEqualTo(GPUdbBase.GPUdbVersion otherVersion)
      Determine whether this version is equal to the given version.
      Parameters:
      otherVersion - GPUdbBase.GPUdbVersion to compare this one to
      Returns:
      true if this version is equal to the given one.
    • isEqualTo

      public boolean isEqualTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion)
      Determine whether this version is equal to the one represented by the four given version components.
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      Returns:
      true if this version is equal to the one with the given components.
    • isEqualTo

      public boolean isEqualTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild)
      Determine whether this version is equal to the one represented by the five given version components.
      Parameters:
      otherMajor - Major component of the version to compare to
      otherMinor - Minor component of the version to compare to
      otherRevision - Revision component of the version to compare to
      otherAbiVersion - ABI version component of the version to compare to
      otherBuild - Build number component of the version to compare to
      Returns:
      true if this version is equal to the one with the given components.
    • equals

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object