Packagecore.data
Classpublic final class aliases
Inheritancealiases Inheritance Object

This object is an helper to defines an dictionary of aliases.



Public Properties
 PropertyDefined By
  length : uint
[read-only] Indicates the number of alias registered in the collector.
aliases
Public Methods
 MethodDefined By
  
Creates a new aliases instance.
aliases
  
clear():void
Clear all alias in the internal map of this object.
aliases
  
containsAlias(alias:String):Boolean
Indicates if the collector contains the passed-in alias expression.
aliases
  
containsValue(value:String):Boolean
Indicates if the collector contains the passed-in type value expression.
aliases
  
getAliases():Array
Returns the Array representation of all aliases registered in this collector.
aliases
  
getValue(alias:String):String
Returns the value of the specified alias.
aliases
  
getValues():Array
Returns the Array representation of all type values registered in this collector.
aliases
  
isEmpty():Boolean
Returns true if the collector is empty.
aliases
  
register(alias:String, value:String):Boolean
Inserts an alias in the collector.
aliases
  
toDictionary():Dictionary
Returns the internal Dictionary reference of this collector.
aliases
  
unregister(alias:String):Boolean
Inserts an alias in the collector.
aliases
Property Detail
lengthproperty
length:uint  [read-only]

Indicates the number of alias registered in the collector.


Implementation
    public function get length():uint
Constructor Detail
aliases()Constructor
public function aliases()

Creates a new aliases instance.

Method Detail
clear()method
public function clear():void

Clear all alias in the internal map of this object.

containsAlias()method 
public function containsAlias(alias:String):Boolean

Indicates if the collector contains the passed-in alias expression.

Parameters

alias:String

Returns
Booleantrue if the collector contains the passed-in alias expression.
containsValue()method 
public function containsValue(value:String):Boolean

Indicates if the collector contains the passed-in type value expression.

Parameters

value:String

Returns
Booleantrue if the collector contains the passed-in value expression.
getAliases()method 
public function getAliases():Array

Returns the Array representation of all aliases registered in this collector.

Example :

         var aliases:Aliases = new Aliases() ;
         
         aliases.register( "Sprite"    , "flash.display.Sprite" ) ;
         aliases.register( "MovieClip" , "flash.display.MovieClip" ) ;
         
         trace( aliases.getAliases() ) ; // Sprite,MovieClip
         

Returns
Array — the Array representation of all aliases registered in this collector.
getValue()method 
public function getValue(alias:String):String

Returns the value of the specified alias.

Example :

         var aliases:Aliases = new Aliases() ;
         
         aliases.register( "Sprite" , "flash.display.Sprite" ) ;
         
         trace( aliases.getValue("Sprite") ) ; // flash.display.Sprite
         

Parameters

alias:String

Returns
String — the value of the specified alias.
getValues()method 
public function getValues():Array

Returns the Array representation of all type values registered in this collector.

Example :

         var aliases:Aliases = new Aliases() ;
         
         aliases.register( "Sprite"    , "flash.display.Sprite" ) ;
         aliases.register( "MovieClip" , "flash.display.MovieClip" ) ;
         
         trace( aliases.getValues() ) ; // flash.display.Sprite,flash.display.MovieClip
         

Returns
Array — the Array representation of all type values registered in this collector.
isEmpty()method 
public function isEmpty():Boolean

Returns true if the collector is empty.

Returns
Booleantrue if the collector is empty.
register()method 
public function register(alias:String, value:String):Boolean

Inserts an alias in the collector. If the alias already exist the value in the collector is replaced.

Example

         var aliases:Aliases = new Aliases() ;
         aliases.register( "MovieClip" , "flash.display.MovieClip" ) ;
         

Parameters

alias:String — The alias name, this expression not must be null and not empty or the method return false.
 
value:String — The value of the alias type, this expression not must be null and not empty or the method return false.

Returns
Booleantrue if the alias can be registered.
toDictionary()method 
public function toDictionary():Dictionary

Returns the internal Dictionary reference of this collector.

Returns
Dictionary — the internal Dictionary reference of this collector.
unregister()method 
public function unregister(alias:String):Boolean

Inserts an alias in the collector. If the alias already exist the value in the collector is replaced.

Example

         var aliases:Aliases = new Aliases() ;
         aliases.register( "MovieClip" , "flash.display.MovieClip" ) ;
         aliases.unregister( "MovieClip" ) ;
         

Parameters

alias:String — The alias name, this expression not must be null and not empty or the method return false.

Returns
Booleantrue if the alias can be uregistered.