Packagevegas.events
Classpublic class Command
InheritanceCommand Inheritance CoreObject
ImplementsIRunnable

A command is a easy entry with name and value property to launch a global command in the Commands static tool class.



Public Properties
 PropertyDefined by
  channel : String
The channel of this command.
Command
  CONSTRUCTOR_ERROR : String = ", you can't create this instance without 'name' definition."
[static] The internal string message used in the constructor if the constructor notify an IllegalArgumentError.
Command
  name : String
The command's type name.
Command
  value : *
The value of this command.
Command
Public Methods
 MethodDefined by
  
Command(... arguments)
Creates a new Command instance.
Command
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
  
run(... arguments):void
Run the process of this command.
Command
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
  
toObject():Object
Returns a simple Object representation of the Commands's instance.
Command
  
toSource(indent:int = 0):String
Returns the string EDEN representation of this object.
Command
  
toString():String
Returns the string representation of this object.
Command
Property detail
channelproperty
public var channel:String

The channel of this command.

CONSTRUCTOR_ERRORproperty 
public static var CONSTRUCTOR_ERROR:String = ", you can't create this instance without 'name' definition."

The internal string message used in the constructor if the constructor notify an IllegalArgumentError.

nameproperty 
public var name:String

The command's type name.

valueproperty 
public var value:*

The value of this command.

Constructor detail
Command()constructor
public function Command(... arguments)

Creates a new Command instance.

Example :

   var c1:Command = new Command() ;
   var c2:Command = new Command([name:String [, value:, channel:String]]]) ;
   var c3:Command = new Command([initObject:Object]) ; 
   
Parameters
... arguments

Throws
— if the optional passed-in arguments failed the initialization of the new Command instance.
Method detail
run()method
public function run(... arguments):void

Run the process of this command.

Parameters
... arguments
toObject()method 
public function toObject():Object

Returns a simple Object representation of the Commands's instance.

Returns
Object — a simple Object representation of the Commands's instance.
toSource()method 
public override function toSource(indent:int = 0):String

Returns the string EDEN representation of this object.

Parameters
indent:int (default = 0)

Returns
String — the string EDEN representation of this object.
toString()method 
public override function toString():String

Returns the string representation of this object.

Returns
String — the string representation of this object.