Packageorg.spicefactory.lib.util
Classpublic class CommandChain
InheritanceCommandChain Inheritance Command

A CommandChain executes multiple Commands sequentially. CommandChain is itself a subclass of Command (Composite Design Pattern) and can be part of other CommandChains.



Public Methods
 MethodDefined by
  
Creates a new empty CommandChain.
CommandChain
  
addCommand(com:Command):void
Adds the specified Command to this CommandChain.
CommandChain
  
clear():void
Removes all Commands from this CommandChain.
CommandChain
  
Creates a clone of this CommandChain.
CommandChain
 Inherited
execute():*
Executes the Command.
Command
  
isEmpty():Boolean
Checks whether this CommandChain is empty (does not contain any Commands).
CommandChain
Constructor detail
CommandChain()constructor
public function CommandChain()

Creates a new empty CommandChain.

Method detail
addCommand()method
public function addCommand(com:Command):void

Adds the specified Command to this CommandChain.

Parameters
com:Command — the Command to add
clear()method 
public function clear():void

Removes all Commands from this CommandChain.

clone()method 
public function clone():CommandChain

Creates a clone of this CommandChain.

Returns
CommandChain — a new CommandChain that contains the same Command as this CommandChain
isEmpty()method 
public function isEmpty():Boolean

Checks whether this CommandChain is empty (does not contain any Commands).

Returns
Boolean — true if this CommandChain does not contain any Commands