Packagesystem.logic
Classpublic class IfUndefined
InheritanceIfUndefined Inheritance IfTask Inheritance Task Inheritance Object

Perform some tasks based on whether a given value is undefined.

Example :

                  
     import examples.process.Message;
     import system.process.logic.IfUndefined;
     
     var task:IfUndefined ;
     
     var value:* ;
     
     task = new IfUndefined(value,new Message("then #1"),new Message("else #1")) ;
     task.run() ; // then #1
     
     value = null ;
     task  = new IfUndefined(value,new Message("then #2"),new Message("else #2")) ;
     task.run() ; // else #2
     
     value = "hello" ;
     task = new IfUndefined(value,new Message("then #3"),new Message("else #3")) ;
     task.run() ; // else #3
     
               

See also

system.rules.Undefined


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
  
IfUndefined(value:*, thenTask:Action = null, elseTask:Action = null, ... elseIfTasks)
Creates a new IfUndefined instance.
IfUndefined
 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
IfUndefined()Constructor
public function IfUndefined(value:*, thenTask:Action = null, elseTask:Action = null, ... elseIfTasks)

Creates a new IfUndefined instance.

Parameters
value:* — The value to evaluate.
 
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.