| Package | system.evaluators |
| Class | public class MultiEvaluator |
| Inheritance | MultiEvaluator Object |
| Implements | Evaluable |
IEvaluator use a Array collection of evaluators to evaluate the specified value.
import system.evaluators.;
var e1:EdenEvaluator = new EdenEvaluator(false) ;
var e2:DateEvaluator = new DateEvaluator() ;
var result:;
var me:MultiEvaluator = new MultiEvaluator( e1, e2 ) ;
result = me.eval( "new Date(2007,5,12,22,10,5)" ) ;
trace("evaluate new Date(2007,5,12,22,10,5) : " + result ) ; // evaluate new Date(2007,5,12,22,10,5) : 07.06.2008 09:10:53
me.clear() ;
me.add( e1 , e2 ) ;
result = me.eval("new Date(2007,5,12,22,10,5)") ;
trace("evaluate new Date(2007,5,12,22,10,5) : " + result ) ; // evaluate new Date(2007,5,12,22,10,5) : Tue Jun 12 22:10:05 GMT+0200 2007
me.remove( e2 ) ;
result = me.eval("new Date(2007,5,12,22,10,5)") ;
trace("evaluate new Date(2007,5,12,22,10,5) : " + result ) ; // evaluate new Date(2007,5,12,22,10,5) : 07.06.2008 09:10:53
| Property | Defined By | ||
|---|---|---|---|
| autoClear : Boolean
Indicates if the MultiEvaluator is cleared before insert new Evaluable objects (in the insert method). | MultiEvaluator | ||
| Method | Defined By | ||
|---|---|---|---|
MultiEvaluator(... evaluators)
Creates a new MultiEvaluator instance. | MultiEvaluator | ||
add(... evaluators):void
Inserts Evaluable objects in the MultiEvaluator. | MultiEvaluator | ||
clear():void
Clear all the Evaluable objects. | MultiEvaluator | ||
eval(o:*):*
Evaluates the specified object. | MultiEvaluator | ||
Removes an Evaluable objects in the MultiEvaluator if is register. | MultiEvaluator | ||
size():Number
The number of elements in this collection of Evaluable references. | MultiEvaluator | ||
| autoClear | property |
public var autoClear:Boolean
Indicates if the MultiEvaluator is cleared before insert new Evaluable objects (in the insert method).
| MultiEvaluator | () | Constructor |
public function MultiEvaluator(... evaluators)Creates a new MultiEvaluator instance.
Parameters... evaluators — The enumeration list of Evaluable objets or Arrays of Evaluable objects. Only Array and Evaluable objects are compatible to fill the MultiEvaluator.
|
| add | () | method |
public function add(... evaluators):void
Inserts Evaluable objects in the MultiEvaluator.
Parameters
... evaluators — The enumeration list of Evaluable objets or Arrays of Evaluator. Only Array and Evaluable are compatible to fill the MultiEvaluator.
|
| clear | () | method |
public function clear():void
Clear all the Evaluable objects.
| eval | () | method |
public function eval(o:*):*Evaluates the specified object.
Parameters
o:* |
* |
| remove | () | method |
public function remove(evaluator:Evaluable):Boolean
Removes an Evaluable objects in the MultiEvaluator if is register.
Parameters
evaluator:Evaluable — The Evaluable to find and remove.
|
Boolean — true if the Evaluable is removed.
|
| size | () | method |
public function size():NumberThe number of elements in this collection of Evaluable references.
ReturnsNumber |