Packagesystem.rules
Classpublic class True
InheritanceTrue Inheritance Object
Implements Rule

Evaluates if the condition is true.

Example :

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



Public Properties
 PropertyDefined By
  condition : *
The condition to evaluate.
True
Public Methods
 MethodDefined By
  
True(condition:* = null)
Creates a new True instance.
True
  
eval():Boolean
Evaluates the specified condition.
True
Property Detail
conditionproperty
public var condition:*

The condition to evaluate.

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

Creates a new True 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