The asdk.condition.GreaterNumber
class is used to test where a number is greater than another number. This implementation
of the BinaryCondition interface compares two operands and determines whether the first operand is greater than the second operand. In the example below
several comparisons are made between numbers to demonstrate the usage of this condition:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
var greaterNumber : asdk.condition.BinaryCondition = new asdk.condition.GreaterNumber(); |
Note that in this example that the first operand is always compared against the second operand so that the result is relative to the first operand. In the example, the first operand of 2 is only greater than the second operand in the first case on line 2. The other comparisons return false when 2 is compared to 2 (line 7) and when 2 is compared to 3 (line 11).
This class can also be used to determine if a number is less than another number by combining the GreatNumber class with asdk.condition.BinaryNot as discussed later in the BinaryNot section of the user guide.
Although this class is typically used to test how numbers relate to each other, Strings can also be passed into the execute method and will be compared based on alphabetical precedence.