Packagesystem.logic
Classpublic class IfTrue
InheritanceIfTrue Inheritance IfTask Inheritance Task Inheritance Object

Perform some tasks based on whether a given condition holds true.

Example :

                  
     import examples.process.Message;
     import system.process.logic.IfTrue;
     
     var task:IfTrue ;
     
     var value:uint = 10 ;  
     
     task = new IfTrue( value == 10 ) ;
     task.addThen( new Message("then") ) ;
     task.addElse( new Message("else") ) ;
     
     task.run() ; // then
     
               

See also

system.rules.True


Public Properties
 PropertyDefined By
 InheritedfinishIt : Signaler
This signal emit when the notifyFinished method is invoked.
Task
 Inheritedlogger : Logger
Determinates the internal Logger reference of this Loggable object.
Task
 Inheritedphase : String
[read-only] The current phase of the action.
Task
 Inheritedrunning : Boolean
[read-only] Indicates true if the process is in progress.
Task
 InheritedstartIt : Signaler
This signal emit when the notifyStarted method is invoked.
Task
 InheritedthrowError : Boolean
Indicates if the class throws errors or notify a finished event when the task failed.
IfTask
Public Methods
 MethodDefined By
  
IfTrue(condition:*, thenTask:Action = null, elseTask:Action = null, ... elseIfTasks)
Creates a new IfTrue instance.
IfTrue
 Inherited
Defines the action when the condition block use the else condition.
IfTask
 Inherited
addElseIf(... elseIfTask):IfTask
Defines an action when the condition block use the elseif condition.
IfTask
 Inherited
addRule(rule:*):IfTask
Defines the main conditional rule of the task.
IfTask
 Inherited
Defines the action when the condition block success and must run the 'then' action.
IfTask
 Inherited
clone():*
[override] Returns the shallow copy of the object.
IfTask
 Inherited
isLocked():Boolean
Returns true if the object is locked.
Task
 Inherited
lock():void
Locks the object.
Task
 Inherited
Notify an ActionEvent when the process is finished.
Task
 Inherited
Notify an ActionEvent when the process is started.
Task
 Inherited
Removes the 'then' action.
IfTask
 Inherited
Removes the 'else' action.
IfTask
 Inherited
Removes the 'conditional rule' of the task.
IfTask
 Inherited
Removes the 'then' action.
IfTask
 Inherited
run(... arguments):void
[override] Run the process.
IfTask
 Inherited
unlock():void
Unlocks the display.
Task
Protected Methods
 MethodDefined By
 Inherited
setRunning(b:Boolean):void
Changes the running property value.
Task
Constructor Detail
IfTrue()Constructor
public function IfTrue(condition:*, thenTask:Action = null, elseTask:Action = null, ... elseIfTasks)

Creates a new IfTrue instance.

Parameters
condition:* — The condition who must be true.
 
thenTask:Action (default = null) — The Action reference to defines the 'then' block in the 'if' conditional task.
 
elseTask:Action (default = null) — The Action reference to defines the 'else' block in the 'if' conditional task.
 
... elseIfTasks — The Array of ElseIf instance to initialize the 'elseif' blocks in the 'if' conditional task.