The asdk.condition.BinaryNot
class provides an implementation of the BinaryCondition interface that
negates another BinaryCondition. As was mentioned previously in the GreaterNumber section, this class can be used
to determine if the first operand is less than the second operand by combining GreaterThan with the BinaryNot class.
The example below demonstrates how to use these two classes together to extend the functionality of GreaterNumber:
1 2 3 4 5 6 7 8 9 10 11 |
var greaterNumber : asdk.condition.BinaryCondition = new asdk.condition.GreaterNumber(); |
When used in conjunction with another BinaryCondition, the BinaryNot class negates the result of that condition. In the case above a GreaterNumber object is passed into the BinaryNot constructor (line 2) so that each time the condition is executed, the GreaterNumber class is executed and then negated to determine if the first operand is less than the second operand. In this example only the last invocation returns true when 2 is compared to 3 on line 9.