Package | org.spicefactory.lib.command.data |
Class | public class DefaultCommandData |
Inheritance | DefaultCommandData ![]() |
Implements | CommandData |
Method | Defined By | ||
---|---|---|---|
DefaultCommandData(parent:CommandData = null)
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 |
DefaultCommandData | () | Constructor |
public function DefaultCommandData(parent:CommandData = null)
Creates a new instance.
Parametersparent:CommandData (default = null ) — the parent to look up results not found in this instance
|
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)
|
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)
|
Object — the last result added to this instance with a matching type
|