Administer > Deploy > Overview: WebSphere Commerce Build and Deployment tool > Customize the Build and Deployment tool > Custom Ant tasks
NumberCompare condition
Compares two numbers of subclass of java.lang.Number.
Parameters
Attribute Description Required Type The type of the number; Must be subclass of java.lang.Number Yes Num1 The number to compare (left side of the operator) Yes Num2 The number to compare against (right side of the operator) Yes Op One of: <=, <, ==, >, >= Yes
Examples
The following example checks whether ${error.count} is greater than 3 as integers and sets the property greaterThan3 if true:
<condition property="greaterThan3"> <numberCompare type="java.lang.Integer" num1="${error.count}" num2="3" op=">" /> </condition>
The following example checks whether ${total.coins} is less than 1.00 as doubles and sets the property lessThan1Dollar if true:
<condition property="lessThan1Dollar"> <numberCompare type="java.lang.Double" num1="${total.coins}" num2="1.00" op="<" /> </condition>
Related concepts
Overview: WebSphere Commerce Build and Deployment tool
Related reference