Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected type (and name) of condition

...

The CompareNumerics Condition can be used to compare two numerical string/variable.

Example:

Code Block
TODO<condition type="comparenumerics" id="isValidNumber">
    <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

...

arg1

This is a mandatory nested element, defining the left numeric value to compare. Any string is allowed, IzPack will try to resolve it as a version string.

arg2

This is a mandatory nested element, defining the right numeric value to compare. Any string is allowed, IzPack will try to resolve it as a version string.

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 (>)