Packageorg.spicefactory.lib.command.data
Classpublic class DefaultCommandData
InheritanceDefaultCommandData Inheritance Object
Implements CommandData

Default implementation of the CommandData interface.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultCommandData
  
addValue(value:Object):void
Adds a value to this instance.
DefaultCommandData
  
getAllObjects(type:Class = null):Array
Returns all results of the specified type.
DefaultCommandData
  
getObject(type:Class = null):Object
Returns the result of the specified type if any command has produced a matching result.
DefaultCommandData
Constructor Detail
DefaultCommandData()Constructor
public function DefaultCommandData(parent:CommandData = null)

Creates a new instance.

Parameters
parent:CommandData (default = null) — the parent to look up results not found in this instance
Method Detail
addValue()method
public function addValue(value:Object):void

Adds a value to this instance. This method is usually only invoked by a command executor that adds the result by one of its commands to this instance.

Parameters

value:Object — the value to add to this instance

getAllObjects()method 
public function getAllObjects(type:Class = null):Array

Returns all results of the specified type. When no matching result was added this method returns an empty Array. When a flow or group contains nested flows or groups their result is represented by a separate CommandData instance.

Parameters

type:Class (default = null) — the type of the results to return (if omitted all types are included)

Returns
Array — an Array holding all matching results that were added to this instance
getObject()method 
public function getObject(type:Class = null):Object

Returns the result of the specified type if any command has produced a matching result. In case of multiple matches the last matching result that was added to this instance is returned. When no matching result was added this method returns null.

Parameters

type:Class (default = null) — the type of the result to return (if omitted all types are considered)

Returns
Object — the last result added to this instance with a matching type