| Package | system.logic |
| Class | public class IfEmptyString |
| Inheritance | IfEmptyString IfTask Task Object |
Example :
package examples
{
import system.process.logic.IfEmptyString;
import flash.display.Sprite;
public class IfEmptyStringExample extends Sprite
{
public function IfEmptyStringExample()
{
var task:IfEmptyString ;
var value:String ;
task = new IfEmptyString( value , new Then(), new Else() ) ;
task.run() ; // else
value = "" ;
task = new IfEmptyString( value , new Then(), new Else() ) ;
task.run() ; // then
value = "hello" ;
task = new IfEmptyString( value , new Then(), new Else() ) ;
task.run() ; // then
}
}
}
import system.process.Task;
class Then extends Task
{
public function Then() {}
public override function run( ...arguments:Array ):void
{
notifyStarted() ;
trace( "then" ) ;
notifyFinished() ;
}
}
class Else extends Task
{
public function Else() {}
public override function run( ...arguments:Array ):void
{
notifyStarted() ;
trace( "else" ) ;
notifyFinished() ;
}
}
See also
| Method | Defined By | ||
|---|---|---|---|
Creates a new IfEmptyString instance. | IfEmptyString | ||
![]() |
Defines the action when the condition block use the else condition. | IfTask | |
![]() |
Defines an action when the condition block use the elseif condition. | IfTask | |
![]() |
Defines the main conditional rule of the task. | IfTask | |
![]() |
Defines the action when the condition block success and must run the 'then' action. | IfTask | |
![]() | clone():* [override]
Returns the shallow copy of the object. | IfTask | |
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
![]() |
Removes the 'then' action. | IfTask | |
![]() |
Removes the 'else' action. | IfTask | |
![]() |
Removes the 'conditional rule' of the task. | IfTask | |
![]() |
Removes the 'then' action. | IfTask | |
![]() | run(... arguments):void [override]
Run the process. | IfTask | |
![]() | unlock():void
Unlocks the display. | Task | |
| IfEmptyString | () | Constructor |
public function IfEmptyString(value:*, thenTask:Action = null, elseTask:Action = null, ... elseIfTasks)Creates a new IfEmptyString instance.
Parametersvalue:* — 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.
|