The CompareNumerics Condition
The CompareNumerics Condition can be used to compare two numerical string/variable.
Example:
<condition type="compareversions" id="isValidWrapperJavaVersion"> <arg1>${my_number}</arg1> <arg2>1000</arg2> <operator>lt</operator> </condition>
The CompareNumerics condition has been introduced in IzPack 5.0.
Nested Elements
The CompareNumerics condition takes three elements : a name, a value and an operator.
name
The name of the variable which will compared. The value of the variable must be an integer.
value
The value used in the comparison. This must be an integer.
operator
This is a mandatory nested element, specifying the comparison operation to apply
Allowed values:
- eq - check whether both versions are equal (=)
- ne - check whether both versions differ (not equal) (<>)
- leq - check whether the left version is less than or equal the right version (<=)
- lt - check whether the left version is less than the right version (<)
- geq - check whether the left version is greater than or equal the right version (>=)
- gt - check whether the left version is greater than the right version (>)