Packagecom.gestureworks.cml.core
Classpublic class CMLObjectList
InheritanceCMLObjectList Inheritance ChildList Inheritance LinkedMap Inheritance flash.utils.Proxy

The CMLObjectList class is the master list for all objects created through CML.

It is populated by the CMLParser class. It is a singleton class that can be accessed through the instance method. The class has an iterator and several other cml object selection functions:

     
     // returns object by given id string
     CMLObjectList.instance.getId("my-id");
     
     // returns object by given css class string
     CMLObjectList.instance.getCSSClass("my-css-class");
     
     // returns object by given as3 class
     CMLObjectList.instance.getClass("ImageElement");
     
     

See also

com.gestureworks.cml.core.CMLParser
com.gestureworks.cml.core.CMLDisplay


Public Properties
 PropertyDefined By
 InheritedcurrentIndex : int
Returns and sets the current index
LinkedMap
 InheritedcurrentKey : *
[read-only] Returns the current key
LinkedMap
 InheritedcurrentValue : *
[read-only] Returns the current value
LinkedMap
 Inheritedindex : int
Returns and sets the current index
LinkedMap
  instance : CMLObjectList
[static] [read-only] Singleton accessor
CMLObjectList
 Inheritedkey : *
[read-only] Returns the current key
LinkedMap
 Inheritedlength : int
[read-only] Returns the length of the LinkedMap
LinkedMap
 Inheritedvalue : *
[read-only] Returns the current value
LinkedMap
Public Methods
 MethodDefined By
  
CMLObjectList(enforcer:SingletonEnforcer)
Constructor allows single instance
CMLObjectList
 Inherited
append(key:*, value:*):void
Appends a value to the keys
LinkedMap
 Inherited
getClass(value:Class, index:int = -1):*
Returns a LinkedMap of objects that are of the specified AS3 class if no second argument is given.
ChildList
 Inherited
getCSSClass(value:String, index:int = -1):*
Returns a LinkedMap of objects that are of the specified CSS class if no second argument is given.
ChildList
  
getId(id:String):*
Returns cml object by id value.
CMLObjectList
 Inherited
getIndex(index:int):*
Returns the value by index
LinkedMap
 Inherited
getKey(key:*):*
Returns the value by key
LinkedMap
 Inherited
getKeyArray():Array
Returns an array of keys.
LinkedMap
 Inherited
Returns an array of values
LinkedMap
 Inherited
hasKey(key:*):Boolean
Returns true if key exists
LinkedMap
 Inherited
hasNext():Boolean
Returns true if the iteration can return one more than the current index
LinkedMap
 Inherited
hasPrev():Boolean
Returns true if the iteration can return one less than the current index
LinkedMap
 Inherited
hasValue(value:*):Boolean
Returns true if value exists
LinkedMap
 Inherited
insert(index:int, key:*, value:*):void
Inserts a new key and value by index
LinkedMap
 Inherited
next():*
Returns the next value
LinkedMap
 Inherited
prepend(key:*, value:*):void
Prepends a key and value
LinkedMap
 Inherited
prev():*
Returns the previous index
LinkedMap
 Inherited
remove():void
Removes a key, value at current index
LinkedMap
 Inherited
removeByValue(value:*):void
Removes a key, value pair by value
LinkedMap
 Inherited
removeIndex(index:int):void
Removes a key, value pair by index
LinkedMap
 Inherited
removeKey(key:*):void
Removes a key, value pair by key
LinkedMap
 Inherited
replace(key:*, value:*):void
Replaces a key, value pair at the current index
LinkedMap
 Inherited
replaceKey(key:*, value:*):void
Replaces a value by key.
LinkedMap
 Inherited
reset():void
Resets the current index to zero
LinkedMap
 Inherited
search(value:*):int
Searches by value and returns the first index found
LinkedMap
 Inherited
searchAll(value:*):Array
Searches by value and returns an array of indices found
LinkedMap
 Inherited
selectIndex(index:int):*
Returns a value by index and increments the current index to the provided index parameter
LinkedMap
 Inherited
selectKey(key:*):*
Returns a value by key and increments the current index to the provided index parameter
LinkedMap
 Inherited
toArray():Array
Returns a multidimensional array of key / value pairs
LinkedMap
Property Detail
instanceproperty
instance:CMLObjectList  [read-only]

Singleton accessor


Implementation
    public static function get instance():CMLObjectList
Constructor Detail
CMLObjectList()Constructor
public function CMLObjectList(enforcer:SingletonEnforcer)

Constructor allows single instance

Parameters
enforcer:SingletonEnforcer
Method Detail
getId()method
public function getId(id:String):*

Returns cml object by id value. Same as: CMLObjectList.instance.getKey(value)

Parameters

id:String — The string cml object id.

Returns
* — object The corresponding display object if found.