ilog.rules.res.model

Class IlrVersion

  • java.lang.Object
    • ilog.rules.res.model.IlrVersion
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IlrVersion>


    public class IlrVersion
    extends java.lang.Object
    implements java.lang.Comparable<IlrVersion>, java.io.Serializable
    The IlrVersion class represents the version number for a RuleApp or a ruleset.
    Since:
    7.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrVersion(int major, int minor)
      Constructs an IlrVersion instance from a major and a minor number.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int compareTo(IlrVersion o)
      Compares the version number of this IlrVersion instance to another object.
      boolean equals(java.lang.Object obj)
      Overrides java.lang.Object#equals(java.lang.Object).
      int getMajor()
      Retrieves the major number of this version instance.
      int getMinor()
      Retrieves the minor number of this version instance.
      int hashCode()
      Overrides java.lang.Object#hashCode().
      static IlrVersion parseVersion(java.lang.String version)
      Retrieves an IlrVersion object that represents the version specified by a string.
      java.lang.String toString()
      Overrides java.lang.Object#toString().
      • Methods inherited from class java.lang.Object

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

      • IlrVersion

        public IlrVersion(int major,
                  int minor)
        Constructs an IlrVersion instance from a major and a minor number.
        Parameters:
        major - The major version number. This value must be greater than 0.
        minor - The minor version number. This value must be greater than or equal to 0.
    • Method Detail

      • parseVersion

        public static IlrVersion parseVersion(java.lang.String version)
                                       throws IlrFormatException
        Retrieves an IlrVersion object that represents the version specified by a string.
        Throws:
        IlrFormatException - if the string cannot be parsed as a version.
        Parameters:
        version - The String to be parsed.
        Returns:
        An IlrVersion object that represents the version specified by a string.
      • getMajor

        public int getMajor()
        Retrieves the major number of this version instance.
        Returns:
        The major number.
      • getMinor

        public int getMinor()
        Retrieves the minor number of this version instance.
        Returns:
        The minor number.
      • compareTo

        public int compareTo(IlrVersion o)
        Compares the version number of this IlrVersion instance to another object.
        Specified by:
        compareTo in interface java.lang.Comparable<IlrVersion>
        Parameters:
        o - The object with which to compare version numbers.
        See Also:
        Comparable.compareTo(java.lang.Object)
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides java.lang.Object#equals(java.lang.Object).
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The object to test against this version instance.
        Returns:
        true if obj is the same as this version instance.
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides java.lang.Object#hashCode().
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code.
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides java.lang.Object#toString().
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of this object.
        See Also:
        Object.toString()

© Copyright IBM Corp. 1987, 2015