The asdk.condition.PositiveNumber
class is used to test for a positive number condition. It provides an implementation
of the UnaryCondition interface that when executed will determine whether the operand passed to the execute method is positive. This allows for encapsulation of the
logic for determining whether or not a number is positive. The example below demonstrates the use of this class:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
var isPositiveCondition : UnaryCondition = new PositiveNumber(); |
In this example only the last call to the execute method returns true when the number one is tested as a positive number.