Package | com.gestureworks.cml.core |
Class | public class CMLObjectList |
Inheritance | CMLObjectList ChildList LinkedMap flash.utils.Proxy |
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
Property | Defined By | ||
---|---|---|---|
currentIndex : int
Returns and sets the current index
| LinkedMap | ||
currentKey : * [read-only]
Returns the current key
| LinkedMap | ||
currentValue : * [read-only]
Returns the current value
| LinkedMap | ||
index : int
Returns and sets the current index
| LinkedMap | ||
instance : CMLObjectList [static] [read-only]
Singleton accessor
| CMLObjectList | ||
key : * [read-only]
Returns the current key
| LinkedMap | ||
length : int [read-only]
Returns the length of the LinkedMap
| LinkedMap | ||
value : * [read-only]
Returns the current value
| LinkedMap |
Method | Defined By | ||
---|---|---|---|
CMLObjectList(enforcer:SingletonEnforcer)
Constructor allows single instance
| CMLObjectList | ||
append(key:*, value:*):void
Appends a value to the keys
| LinkedMap | ||
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 | ||
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 | ||
getIndex(index:int):*
Returns the value by index
| LinkedMap | ||
getKey(key:*):*
Returns the value by key
| LinkedMap | ||
getKeyArray():Array
Returns an array of keys. | LinkedMap | ||
getValueArray():Array
Returns an array of values
| LinkedMap | ||
hasKey(key:*):Boolean
Returns true if key exists
| LinkedMap | ||
hasNext():Boolean
Returns true if the iteration can return one more than the current index
| LinkedMap | ||
hasPrev():Boolean
Returns true if the iteration can return one less than the current index
| LinkedMap | ||
hasValue(value:*):Boolean
Returns true if value exists
| LinkedMap | ||
insert(index:int, key:*, value:*):void
Inserts a new key and value by index
| LinkedMap | ||
next():*
Returns the next value
| LinkedMap | ||
prepend(key:*, value:*):void
Prepends a key and value
| LinkedMap | ||
prev():*
Returns the previous index
| LinkedMap | ||
remove():void
Removes a key, value at current index
| LinkedMap | ||
removeByValue(value:*):void
Removes a key, value pair by value
| LinkedMap | ||
removeIndex(index:int):void
Removes a key, value pair by index
| LinkedMap | ||
removeKey(key:*):void
Removes a key, value pair by key
| LinkedMap | ||
replace(key:*, value:*):void
Replaces a key, value pair at the current index
| LinkedMap | ||
replaceKey(key:*, value:*):void
Replaces a value by key. | LinkedMap | ||
reset():void
Resets the current index to zero
| LinkedMap | ||
search(value:*):int
Searches by value and returns the first index found
| LinkedMap | ||
searchAll(value:*):Array
Searches by value and returns an array of indices found
| LinkedMap | ||
selectIndex(index:int):*
Returns a value by index and increments the current index
to the provided index parameter
| LinkedMap | ||
selectKey(key:*):*
Returns a value by key and increments the current index
to the provided index parameter
| LinkedMap | ||
toArray():Array
Returns a multidimensional array of key / value pairs
| LinkedMap |
instance | property |
instance:CMLObjectList
[read-only] Singleton accessor
public static function get instance():CMLObjectList
CMLObjectList | () | Constructor |
public function CMLObjectList(enforcer:SingletonEnforcer)
Constructor allows single instance
Parametersenforcer:SingletonEnforcer |
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.
|
* — object The corresponding display object if found.
|