Package org.ggf.drmaa

Class Version

java.lang.Object
org.ggf.drmaa.Version
All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class Version extends Object implements Serializable, Cloneable, Comparable
This class is used to represent the DRM version info.
Since:
0.5
Version:
1.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Version(int major, int minor)
    Create a new Version instance
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Get the major version number.
    int
    Get the minor version number.
    int
    Get a hash code based on the major and minor version numbers.
    Converts this Version object into a printable String.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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

      public String toString()
      Converts this Version object into a printable String. The String's format is <major>.<minor>.
      Overrides:
      toString in class Object
      Returns:
      a printable String of the format <major>.<minor>
    • equals

      public boolean equals(Object obj)
      Test for equality between two Version objects.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object against which to test
      Returns:
      whether the given object has the same major and minor version numbers as this object
    • hashCode

      public int hashCode()
      Get a hash code based on the major and minor version numbers.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code
    • clone

      public Object clone()
      Returns a copy of this object.
      Returns:
      a copy of this object.
    • compareTo

      public int compareTo(Object o)
      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 interface Comparable
      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.