Package com.gpudb
Class GPUdbBase.GPUdbVersion
- java.lang.Object
-
- com.gpudb.GPUdbBase.GPUdbVersion
-
-
Constructor Summary
Constructors Constructor Description GPUdbVersion(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(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.booleanequals(Object obj)intgetAbiVersion()Gets the ABI version (fourth) component of the version.longgetBuild()Gets the build number (fifth) component of the version.StringgetFullVersion()Get the full five-component version.intgetMajor()Gets the major (first) component of the version.intgetMinor()Gets the minor (second) component of the version.intgetRevision()Gets the revision (third) component of the version.StringgetVersion()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).StringtoString()
-
-
-
Constructor Detail
-
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 version
-
GPUdbVersion
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 Detail
-
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.0ormajor.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 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 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.GPUdbVersionto 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.GPUdbVersionto 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 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 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 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 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.GPUdbVersionto 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 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 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 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 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.GPUdbVersionto 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 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 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 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 to- Returns:
- true if this version is equal to the one with the given components.
-
-