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
TheIlrVersion
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 anIlrVersion
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 thisIlrVersion
instance to another object.boolean
equals(java.lang.Object obj)
Overridesjava.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()
Overridesjava.lang.Object#hashCode()
.static IlrVersion
parseVersion(java.lang.String version)
Retrieves anIlrVersion
object that represents the version specified by a string.java.lang.String
toString()
Overridesjava.lang.Object#toString()
.
-
-
-
Constructor Detail
-
IlrVersion
public IlrVersion(int major, int minor)
Constructs anIlrVersion
instance from a major and a minor number.- Parameters:
major
- The major version number. This value must be greater than0
.minor
- The minor version number. This value must be greater than or equal to0
.
-
-
Method Detail
-
parseVersion
public static IlrVersion parseVersion(java.lang.String version) throws IlrFormatException
Retrieves anIlrVersion
object that represents the version specified by a string.- Throws:
IlrFormatException
- if the string cannot be parsed as a version.- Parameters:
version
- TheString
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 thisIlrVersion
instance to another object.- Specified by:
compareTo
in interfacejava.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)
Overridesjava.lang.Object#equals(java.lang.Object)
.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- The object to test against this version instance.- Returns:
true
ifobj
is the same as this version instance.- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Overridesjava.lang.Object#hashCode()
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
Overridesjava.lang.Object#toString()
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A
String
representation of this object. - See Also:
Object.toString()
-
-