Packagesystem.rules
Classpublic class BooleanRule
InheritanceBooleanRule Inheritance Object
Implements Rule

Evaluates a basic boolean conditional rule.

Example :

                  
     import system.rules.Rule ;
     import system.rules.BooleanRule ;
     
     var cond1:Rule = new BooleanRule( true  ) ;
     var cond2:Rule = new BooleanRule( false ) ;
     var cond3:Rule = new BooleanRule( cond1 ) ;
     
     trace( cond1.eval() ) ; // true
     trace( cond2.eval() ) ; // false
     trace( cond3.eval() ) ; // true
     
               



Public Properties
 PropertyDefined By
  condition : *
The condition to evaluate.
BooleanRule
Public Methods
 MethodDefined By
  
BooleanRule(condition:* = null)
Creates a new BooleanRule instance.
BooleanRule
  
eval():Boolean
Evaluates the specified condition.
BooleanRule
  
toString():String
Returns the String representation of the object.
BooleanRule
Property Detail
conditionproperty
public var condition:*

The condition to evaluate.

Constructor Detail
BooleanRule()Constructor
public function BooleanRule(condition:* = null)

Creates a new BooleanRule instance.

Parameters
condition:* (default = null) — The Boolean value or the Rule object to evaluate.
Method Detail
eval()method
public function eval():Boolean

Evaluates the specified condition.

Returns
Boolean
toString()method 
public function toString():String

Returns the String representation of the object.

Returns
String — the String representation of the object.