java.lang.Object
com.gpudb.GPUdbBase.GPUdbVersion
Enclosing class:
Contains the version of the client API or the GPUdb server. Has helper methods to compare with other versions.
Constructor Summary
ConstructorsConstructorDescriptionGPUdbVersion(int major, int minor, int revision, int abiVersion) Creates aGPUdbBase.GPUdbVersionwith a 4-component version number.GPUdbVersion(int major, int minor, int revision, int abiVersion, long build) Creates aGPUdbBase.GPUdbVersionwith a 5-component version number.Method Summary
Modifier and TypeMethodDescriptionintcompareTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion, long otherBuild) Compare this version to the one represented by the five given version components.intcompareTo(GPUdbBase.GPUdbVersion otherVersion) Compare this version to the given version.booleanintGets the ABI version (fourth) component of the version.longgetBuild()Gets the build number (fifth) component of the version.Get the full five-component version.intgetMajor()Gets the major (first) component of the version.intgetMinor()Gets the minor (second) component of the version.intGets the revision (third) component of the version.Get the four-component version.inthashCode()booleanisEqualTo(int otherMajor, int otherMinor, int otherRevision, int otherAbiVersion) Determine whether this version is equal to the one represented by the four given version components.booleanisEqualTo(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.booleanisEqualTo(GPUdbBase.GPUdbVersion otherVersion) Determine whether this version is equal to the given version.booleanisNewerThan(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).booleanisNewerThan(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).booleanisNewerThan(GPUdbBase.GPUdbVersion otherVersion) Determine whether this version is newer than the given version (not equal to).booleanisOlderThan(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).booleanisOlderThan(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).booleanisOlderThan(GPUdbBase.GPUdbVersion otherVersion) Determine whether this version is older than the given version (not equal to).toString()
Constructor Details
GPUdbVersion
public GPUdbVersion(int major, int minor, int revision, int abiVersion) Creates aGPUdbBase.GPUdbVersionwith a 4-component version number. The build number for this version will be 0.Parameters:major- Major component of this versionminor- Minor component of this versionrevision- Revision component of this versionabiVersion- ABI version component of this versionGPUdbVersion
public GPUdbVersion(int major, int minor, int revision, int abiVersion, long build) Creates aGPUdbBase.GPUdbVersionwith a 5-component version number.Parameters:major- Major component of this versionminor- Minor component of this versionrevision- Revision component of this versionabiVersion- ABI version component of this versionbuild- Build number component of this version
Method Details
getMajor
public int getMajor()Gets the major (first) component of the version.Returns:the ‘major’ component valuegetMinor
public int getMinor()Gets the minor (second) component of the version.Returns:the ‘minor’ component valuegetRevision
public int getRevision()Gets the revision (third) component of the version.Returns:the ‘revision’ component valuegetAbiVersion
public int getAbiVersion()Gets the ABI version (fourth) component of the version.Returns:the ‘ABI version’ component valuegetBuild
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 componentcompareTo
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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare tootherBuild- Build number component of the version to compare toReturns:-1 if this version is less than the one with the specified components, 1 if this version is greater, and 0 if equal.compareTo
Compare this version to the given version.Parameters:otherVersion-GPUdbBase.GPUdbVersionto compare this one toReturns:-1 if this version is less than the given one, 1 if this version is greater, and 0 if they’re equal.isNewerThan
Determine whether this version is newer than the given version (not equal to).Parameters:otherVersion-GPUdbBase.GPUdbVersionto compare this one toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare tootherBuild- Build number component of the version to compare toReturns:true if this version is newer than the one with the given components.isOlderThan
Determine whether this version is older than the given version (not equal to).Parameters:otherVersion-GPUdbBase.GPUdbVersionto compare this one toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare tootherBuild- Build number component of the version to compare toReturns:true if this version is older than the one with the given components.isEqualTo
Determine whether this version is equal to the given version.Parameters:otherVersion-GPUdbBase.GPUdbVersionto compare this one toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare toReturns: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 tootherMinor- Minor component of the version to compare tootherRevision- Revision component of the version to compare tootherAbiVersion- ABI version component of the version to compare tootherBuild- Build number component of the version to compare toReturns:true if this version is equal to the one with the given components.