Rule Execution Server API

ilog.rules.res.model
Class IlrVersion

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

public class IlrVersion
extends Object
implements Comparable<IlrVersion>, Serializable

The IlrVersion class represents the version number for a RuleApp or a ruleset.

Since:
7.0
See Also:
Serialized Form

Constructor Summary
IlrVersion(int major, int minor)
          Constructs an IlrVersion instance from a major and a minor number.
 
Method Summary
 int compareTo(IlrVersion o)
          Compares the version number of this IlrVersion instance to another object.
 boolean equals(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(String version)
          Retrieves an IlrVersion object that represents the version specified by a string.
 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(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 Comparable<IlrVersion>
Parameters:
o - The object with which to compare version numbers.
See Also:
Comparable.compareTo(java.lang.Object)

equals

public boolean equals(Object obj)
Overrides java.lang.Object#equals(java.lang.Object).

Overrides:
equals in class 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 Object
Returns:
A hash code.
See Also:
Object.hashCode()

toString

public String toString()
Overrides java.lang.Object#toString().

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

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013