Package org.ggf.drmaa
Class Version
java.lang.Object
org.ggf.drmaa.Version
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
This class is used to represent the DRM version info.
- Since:
- 0.5
- Version:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this object.int
Compares this object with the specified object for order.boolean
Test for equality between two Version objects.int
getMajor()
Get the major version number.int
getMinor()
Get the minor version number.int
hashCode()
Get a hash code based on the major and minor version numbers.toString()
Converts this Version object into a printable String.
-
Constructor Details
-
Version
public Version(int major, int minor) Create a new Version instance- Parameters:
major
- major version number (non-negative integer)minor
- minor version number (non-negative integer)
-
-
Method Details
-
getMajor
public int getMajor()Get the major version number.- Returns:
- major version number (non-negative integer)
-
getMinor
public int getMinor()Get the minor version number.- Returns:
- minor version number (non-negative integer)
-
toString
Converts this Version object into a printable String. The String's format is <major>.<minor>. -
equals
Test for equality between two Version objects. -
hashCode
public int hashCode()Get a hash code based on the major and minor version numbers. -
clone
Returns a copy of this object.- Returns:
- a copy of this object.
-
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- the Object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException
- if the specified object's type prevents it from being compared to this Object.
-